shell32: Add explorer toolbar bitmaps.
[wine/hramrach.git] / dlls / mscoree / corruntimehost.c
blob9de9bf5497b0392143a8fc87f03a4d356bb4c8aa
1 /*
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
20 #define COBJMACROS
22 #include <stdarg.h>
24 #include "windef.h"
25 #include "winbase.h"
26 #include "winuser.h"
27 #include "winreg.h"
28 #include "ole2.h"
30 #include "cor.h"
31 #include "mscoree.h"
33 #include "wine/debug.h"
35 WINE_DEFAULT_DEBUG_CHANNEL( mscoree );
37 typedef struct _corruntimehost
39 const struct ICorRuntimeHostVtbl *lpVtbl;
40 LONG ref;
41 } corruntimehost;
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,
50 REFIID riid,
51 void **ppvObject)
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 ) )
59 *ppvObject = iface;
61 else
63 FIXME("Unsupported interface %s\n", debugstr_guid(riid));
64 return E_NOINTERFACE;
67 ICorRuntimeHost_AddRef( iface );
69 return S_OK;
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 );
81 ULONG ref;
83 ref = InterlockedDecrement( &This->ref );
84 if ( ref == 0 )
86 HeapFree( GetProcessHeap(), 0, This );
89 return ref;
92 /*** ICorRuntimeHost methods ***/
93 static HRESULT WINAPI corruntimehost_CreateLogicalThreadState(
94 ICorRuntimeHost* iface)
96 FIXME("stub %p\n", iface);
97 return E_NOTIMPL;
100 static HRESULT WINAPI corruntimehost_DeleteLogicalThreadState(
101 ICorRuntimeHost* iface)
103 FIXME("stub %p\n", iface);
104 return E_NOTIMPL;
107 static HRESULT WINAPI corruntimehost_SwitchInLogicalThreadState(
108 ICorRuntimeHost* iface,
109 DWORD *fiberCookie)
111 FIXME("stub %p\n", iface);
112 return E_NOTIMPL;
115 static HRESULT WINAPI corruntimehost_SwitchOutLogicalThreadState(
116 ICorRuntimeHost* iface,
117 DWORD **fiberCookie)
119 FIXME("stub %p\n", iface);
120 return E_NOTIMPL;
123 static HRESULT WINAPI corruntimehost_LocksHeldByLogicalThread(
124 ICorRuntimeHost* iface,
125 DWORD *pCount)
127 FIXME("stub %p\n", iface);
128 return E_NOTIMPL;
131 static HRESULT WINAPI corruntimehost_MapFile(
132 ICorRuntimeHost* iface,
133 HANDLE hFile,
134 HMODULE *mapAddress)
136 FIXME("stub %p\n", iface);
137 return E_NOTIMPL;
140 static HRESULT WINAPI corruntimehost_GetConfiguration(
141 ICorRuntimeHost* iface,
142 ICorConfiguration **pConfiguration)
144 FIXME("stub %p\n", iface);
145 return E_NOTIMPL;
148 static HRESULT WINAPI corruntimehost_Start(
149 ICorRuntimeHost* iface)
151 FIXME("stub %p\n", iface);
152 return E_NOTIMPL;
155 static HRESULT WINAPI corruntimehost_Stop(
156 ICorRuntimeHost* iface)
158 FIXME("stub %p\n", iface);
159 return E_NOTIMPL;
162 static HRESULT WINAPI corruntimehost_CreateDomain(
163 ICorRuntimeHost* iface,
164 LPCWSTR friendlyName,
165 IUnknown *identityArray,
166 IUnknown **appDomain)
168 FIXME("stub %p\n", iface);
169 return E_NOTIMPL;
172 static HRESULT WINAPI corruntimehost_GetDefaultDomain(
173 ICorRuntimeHost* iface,
174 IUnknown **pAppDomain)
176 FIXME("stub %p\n", iface);
177 return E_NOTIMPL;
180 static HRESULT WINAPI corruntimehost_EnumDomains(
181 ICorRuntimeHost* iface,
182 HDOMAINENUM *hEnum)
184 FIXME("stub %p\n", iface);
185 return E_NOTIMPL;
188 static HRESULT WINAPI corruntimehost_NextDomain(
189 ICorRuntimeHost* iface,
190 HDOMAINENUM hEnum,
191 IUnknown **appDomain)
193 FIXME("stub %p\n", iface);
194 return E_NOTIMPL;
197 static HRESULT WINAPI corruntimehost_CloseEnum(
198 ICorRuntimeHost* iface,
199 HDOMAINENUM hEnum)
201 FIXME("stub %p\n", iface);
202 return E_NOTIMPL;
205 static HRESULT WINAPI corruntimehost_CreateDomainEx(
206 ICorRuntimeHost* iface,
207 LPCWSTR friendlyName,
208 IUnknown *setup,
209 IUnknown *evidence,
210 IUnknown **appDomain)
212 FIXME("stub %p\n", iface);
213 return E_NOTIMPL;
216 static HRESULT WINAPI corruntimehost_CreateDomainSetup(
217 ICorRuntimeHost* iface,
218 IUnknown **appDomainSetup)
220 FIXME("stub %p\n", iface);
221 return E_NOTIMPL;
224 static HRESULT WINAPI corruntimehost_CreateEvidence(
225 ICorRuntimeHost* iface,
226 IUnknown **evidence)
228 FIXME("stub %p\n", iface);
229 return E_NOTIMPL;
232 static HRESULT WINAPI corruntimehost_UnloadDomain(
233 ICorRuntimeHost* iface,
234 IUnknown *appDomain)
236 FIXME("stub %p\n", iface);
237 return E_NOTIMPL;
240 static HRESULT WINAPI corruntimehost_CurrentDomain(
241 ICorRuntimeHost* iface,
242 IUnknown **appDomain)
244 FIXME("stub %p\n", iface);
245 return E_NOTIMPL;
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,
261 corruntimehost_Stop,
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 );
279 if ( !This )
280 return NULL;
282 This->lpVtbl = &corruntimehost_vtbl;
283 This->ref = 1;
285 FIXME("return iface %p\n", This);
287 return (IUnknown*) &This->lpVtbl;