3 * Copyright 2008 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
33 #include "wine/debug.h"
35 WINE_DEFAULT_DEBUG_CHANNEL( mscoree );
37 typedef struct _corruntimehost
39 const struct ICorRuntimeHostVtbl *lpVtbl;
43 static inline corruntimehost *impl_from_ICorRuntimeHost( ICorRuntimeHost *iface )
45 return (corruntimehost *)((char*)iface - FIELD_OFFSET(corruntimehost, lpVtbl));
48 /*** IUnknown methods ***/
49 static HRESULT WINAPI corruntimehost_QueryInterface(ICorRuntimeHost* iface,
53 corruntimehost *This = impl_from_ICorRuntimeHost( iface );
54 TRACE("%p %s %p\n", This, debugstr_guid(riid), ppvObject);
56 if ( IsEqualGUID( riid, &IID_ICorRuntimeHost ) ||
57 IsEqualGUID( riid, &IID_IUnknown ) )
63 FIXME("Unsupported interface %s\n", debugstr_guid(riid));
67 ICorRuntimeHost_AddRef( iface );
72 static ULONG WINAPI corruntimehost_AddRef(ICorRuntimeHost* iface)
74 corruntimehost *This = impl_from_ICorRuntimeHost( iface );
75 return InterlockedIncrement( &This->ref );
78 static ULONG WINAPI corruntimehost_Release(ICorRuntimeHost* iface)
80 corruntimehost *This = impl_from_ICorRuntimeHost( iface );
83 ref = InterlockedDecrement( &This->ref );
86 HeapFree( GetProcessHeap(), 0, This );
92 /*** ICorRuntimeHost methods ***/
93 static HRESULT WINAPI corruntimehost_CreateLogicalThreadState(
94 ICorRuntimeHost* iface)
96 FIXME("stub %p\n", iface);
100 static HRESULT WINAPI corruntimehost_DeleteLogicalThreadState(
101 ICorRuntimeHost* iface)
103 FIXME("stub %p\n", iface);
107 static HRESULT WINAPI corruntimehost_SwitchInLogicalThreadState(
108 ICorRuntimeHost* iface,
111 FIXME("stub %p\n", iface);
115 static HRESULT WINAPI corruntimehost_SwitchOutLogicalThreadState(
116 ICorRuntimeHost* iface,
119 FIXME("stub %p\n", iface);
123 static HRESULT WINAPI corruntimehost_LocksHeldByLogicalThread(
124 ICorRuntimeHost* iface,
127 FIXME("stub %p\n", iface);
131 static HRESULT WINAPI corruntimehost_MapFile(
132 ICorRuntimeHost* iface,
136 FIXME("stub %p\n", iface);
140 static HRESULT WINAPI corruntimehost_GetConfiguration(
141 ICorRuntimeHost* iface,
142 ICorConfiguration **pConfiguration)
144 FIXME("stub %p\n", iface);
148 static HRESULT WINAPI corruntimehost_Start(
149 ICorRuntimeHost* iface)
151 FIXME("stub %p\n", iface);
155 static HRESULT WINAPI corruntimehost_Stop(
156 ICorRuntimeHost* iface)
158 FIXME("stub %p\n", iface);
162 static HRESULT WINAPI corruntimehost_CreateDomain(
163 ICorRuntimeHost* iface,
164 LPCWSTR friendlyName,
165 IUnknown *identityArray,
166 IUnknown **appDomain)
168 FIXME("stub %p\n", iface);
172 static HRESULT WINAPI corruntimehost_GetDefaultDomain(
173 ICorRuntimeHost* iface,
174 IUnknown **pAppDomain)
176 FIXME("stub %p\n", iface);
180 static HRESULT WINAPI corruntimehost_EnumDomains(
181 ICorRuntimeHost* iface,
184 FIXME("stub %p\n", iface);
188 static HRESULT WINAPI corruntimehost_NextDomain(
189 ICorRuntimeHost* iface,
191 IUnknown **appDomain)
193 FIXME("stub %p\n", iface);
197 static HRESULT WINAPI corruntimehost_CloseEnum(
198 ICorRuntimeHost* iface,
201 FIXME("stub %p\n", iface);
205 static HRESULT WINAPI corruntimehost_CreateDomainEx(
206 ICorRuntimeHost* iface,
207 LPCWSTR friendlyName,
210 IUnknown **appDomain)
212 FIXME("stub %p\n", iface);
216 static HRESULT WINAPI corruntimehost_CreateDomainSetup(
217 ICorRuntimeHost* iface,
218 IUnknown **appDomainSetup)
220 FIXME("stub %p\n", iface);
224 static HRESULT WINAPI corruntimehost_CreateEvidence(
225 ICorRuntimeHost* iface,
228 FIXME("stub %p\n", iface);
232 static HRESULT WINAPI corruntimehost_UnloadDomain(
233 ICorRuntimeHost* iface,
236 FIXME("stub %p\n", iface);
240 static HRESULT WINAPI corruntimehost_CurrentDomain(
241 ICorRuntimeHost* iface,
242 IUnknown **appDomain)
244 FIXME("stub %p\n", iface);
248 static const struct ICorRuntimeHostVtbl corruntimehost_vtbl =
250 corruntimehost_QueryInterface,
251 corruntimehost_AddRef,
252 corruntimehost_Release,
253 corruntimehost_CreateLogicalThreadState,
254 corruntimehost_DeleteLogicalThreadState,
255 corruntimehost_SwitchInLogicalThreadState,
256 corruntimehost_SwitchOutLogicalThreadState,
257 corruntimehost_LocksHeldByLogicalThread,
258 corruntimehost_MapFile,
259 corruntimehost_GetConfiguration,
260 corruntimehost_Start,
262 corruntimehost_CreateDomain,
263 corruntimehost_GetDefaultDomain,
264 corruntimehost_EnumDomains,
265 corruntimehost_NextDomain,
266 corruntimehost_CloseEnum,
267 corruntimehost_CreateDomainEx,
268 corruntimehost_CreateDomainSetup,
269 corruntimehost_CreateEvidence,
270 corruntimehost_UnloadDomain,
271 corruntimehost_CurrentDomain
274 IUnknown* create_corruntimehost(void)
276 corruntimehost *This;
278 This = HeapAlloc( GetProcessHeap(), 0, sizeof *This );
282 This->lpVtbl = &corruntimehost_vtbl;
285 FIXME("return iface %p\n", This);
287 return (IUnknown*) &This->lpVtbl;