winmm: Mark two functions as hidden.
[wine/multimedia.git] / dlls / mscoree / cordebug.c
bloba2ad032ab51cedd901153b3831ee5de7cff25716
1 /*
3 * Copyright 2011 Alistair Leslie-Hughes
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
20 #define COBJMACROS
22 #include <stdarg.h>
24 #include "windef.h"
25 #include "winbase.h"
27 #include "winuser.h"
28 #include "winnls.h"
29 #include "winreg.h"
30 #include "ole2.h"
31 #include "shellapi.h"
32 #include "mscoree.h"
33 #include "corhdr.h"
34 #include "metahost.h"
35 #include "cordebug.h"
36 #include "wine/list.h"
37 #include "mscoree_private.h"
38 #include "wine/debug.h"
41 WINE_DEFAULT_DEBUG_CHANNEL( mscoree );
44 static inline RuntimeHost *impl_from_ICorDebug( ICorDebug *iface )
46 return CONTAINING_RECORD(iface, RuntimeHost, ICorDebug_iface);
49 /*** IUnknown methods ***/
50 static HRESULT WINAPI CorDebug_QueryInterface(ICorDebug *iface, REFIID riid, void **ppvObject)
52 RuntimeHost *This = impl_from_ICorDebug( iface );
54 TRACE("%p %s %p\n", This, debugstr_guid(riid), ppvObject);
56 if ( IsEqualGUID( riid, &IID_ICorDebug ) ||
57 IsEqualGUID( riid, &IID_IUnknown ) )
59 *ppvObject = &This->ICorDebug_iface;
61 else
63 FIXME("Unsupported interface %s\n", debugstr_guid(riid));
64 return E_NOINTERFACE;
67 ICorDebug_AddRef( iface );
69 return S_OK;
72 static ULONG WINAPI CorDebug_AddRef(ICorDebug *iface)
74 RuntimeHost *This = impl_from_ICorDebug( iface );
75 return ICorRuntimeHost_AddRef(&This->ICorRuntimeHost_iface);
78 static ULONG WINAPI CorDebug_Release(ICorDebug *iface)
80 RuntimeHost *This = impl_from_ICorDebug( iface );
81 return ICorRuntimeHost_Release(&This->ICorRuntimeHost_iface);
84 /*** ICorDebug methods ***/
85 static HRESULT WINAPI CorDebug_Initialize(ICorDebug *iface)
87 RuntimeHost *This = impl_from_ICorDebug( iface );
88 FIXME("stub %p\n", This);
89 return S_OK;
92 static HRESULT WINAPI CorDebug_Terminate(ICorDebug *iface)
94 RuntimeHost *This = impl_from_ICorDebug( iface );
95 FIXME("stub %p\n", This);
96 return E_NOTIMPL;
99 static HRESULT WINAPI CorDebug_SetManagedHandler(ICorDebug *iface, ICorDebugManagedCallback *pCallback)
101 RuntimeHost *This = impl_from_ICorDebug( iface );
102 FIXME("stub %p %p\n", This, pCallback);
103 return E_NOTIMPL;
106 static HRESULT WINAPI CorDebug_SetUnmanagedHandler(ICorDebug *iface, ICorDebugUnmanagedCallback *pCallback)
108 RuntimeHost *This = impl_from_ICorDebug( iface );
109 FIXME("stub %p %p\n", This, pCallback);
110 return E_NOTIMPL;
113 static HRESULT WINAPI CorDebug_CreateProcess(ICorDebug *iface, LPCWSTR lpApplicationName,
114 LPWSTR lpCommandLine, LPSECURITY_ATTRIBUTES lpProcessAttributes,
115 LPSECURITY_ATTRIBUTES lpThreadAttributes, BOOL bInheritHandles,
116 DWORD dwCreationFlags, PVOID lpEnvironment,LPCWSTR lpCurrentDirectory,
117 LPSTARTUPINFOW lpStartupInfo, LPPROCESS_INFORMATION lpProcessInformation,
118 CorDebugCreateProcessFlags debuggingFlags, ICorDebugProcess **ppProcess)
120 RuntimeHost *This = impl_from_ICorDebug( iface );
121 FIXME("stub %p %s %s %p %p %d %d %p %s %p %p %d %p\n", This, debugstr_w(lpApplicationName),
122 debugstr_w(lpCommandLine), lpProcessAttributes, lpThreadAttributes,
123 bInheritHandles, dwCreationFlags, lpEnvironment, debugstr_w(lpCurrentDirectory),
124 lpStartupInfo, lpProcessInformation, debuggingFlags, ppProcess);
125 return E_NOTIMPL;
128 static HRESULT WINAPI CorDebug_DebugActiveProcess(ICorDebug *iface, DWORD id, BOOL win32Attach,
129 ICorDebugProcess **ppProcess)
131 RuntimeHost *This = impl_from_ICorDebug( iface );
132 FIXME("stub %p %d %d %p\n", This, id, win32Attach, ppProcess);
133 return E_NOTIMPL;
136 static HRESULT WINAPI CorDebug_EnumerateProcesses( ICorDebug *iface, ICorDebugProcessEnum **ppProcess)
138 RuntimeHost *This = impl_from_ICorDebug( iface );
139 FIXME("stub %p %p\n", This, ppProcess);
140 return E_NOTIMPL;
143 static HRESULT WINAPI CorDebug_GetProcess(ICorDebug *iface, DWORD dwProcessId, ICorDebugProcess **ppProcess)
145 RuntimeHost *This = impl_from_ICorDebug( iface );
146 FIXME("stub %p %d %p\n", This, dwProcessId, ppProcess);
147 return E_NOTIMPL;
150 static HRESULT WINAPI CorDebug_CanLaunchOrAttach(ICorDebug *iface, DWORD dwProcessId,
151 BOOL win32DebuggingEnabled)
153 RuntimeHost *This = impl_from_ICorDebug( iface );
154 FIXME("stub %p %d %d\n", This, dwProcessId, win32DebuggingEnabled);
155 return E_NOTIMPL;
158 static const struct ICorDebugVtbl cordebug_vtbl =
160 CorDebug_QueryInterface,
161 CorDebug_AddRef,
162 CorDebug_Release,
163 CorDebug_Initialize,
164 CorDebug_Terminate,
165 CorDebug_SetManagedHandler,
166 CorDebug_SetUnmanagedHandler,
167 CorDebug_CreateProcess,
168 CorDebug_DebugActiveProcess,
169 CorDebug_EnumerateProcesses,
170 CorDebug_GetProcess,
171 CorDebug_CanLaunchOrAttach
174 void cordebug_init(RuntimeHost *This)
176 This->ICorDebug_iface.lpVtbl = &cordebug_vtbl;