2 * ICLRMetaHost - discovery and management of available .NET runtimes
4 * Copyright 2010 Vincent Povirk for CodeWeavers
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
25 #include "wine/unicode.h"
26 #include "wine/library.h"
33 #include "mscoree_private.h"
35 #include "wine/debug.h"
37 WINE_DEFAULT_DEBUG_CHANNEL( mscoree );
41 const struct ICLRMetaHostVtbl *CLRMetaHost_vtbl;
44 static const struct CLRMetaHost GlobalCLRMetaHost;
46 static HRESULT WINAPI CLRMetaHost_QueryInterface(ICLRMetaHost* iface,
50 TRACE("%s %p\n", debugstr_guid(riid), ppvObject);
52 if ( IsEqualGUID( riid, &IID_ICLRMetaHost ) ||
53 IsEqualGUID( riid, &IID_IUnknown ) )
59 FIXME("Unsupported interface %s\n", debugstr_guid(riid));
63 ICLRMetaHost_AddRef( iface );
68 static ULONG WINAPI CLRMetaHost_AddRef(ICLRMetaHost* iface)
73 static ULONG WINAPI CLRMetaHost_Release(ICLRMetaHost* iface)
78 static HRESULT WINAPI CLRMetaHost_GetRuntime(ICLRMetaHost* iface,
79 LPCWSTR pwzVersion, REFIID iid, LPVOID *ppRuntime)
81 FIXME("%s %s %p\n", debugstr_w(pwzVersion), debugstr_guid(iid), ppRuntime);
86 static HRESULT WINAPI CLRMetaHost_GetVersionFromFile(ICLRMetaHost* iface,
87 LPCWSTR pwzFilePath, LPWSTR pwzBuffer, DWORD *pcchBuffer)
89 FIXME("%s %p %p\n", debugstr_w(pwzFilePath), pwzBuffer, pcchBuffer);
94 static HRESULT WINAPI CLRMetaHost_EnumerateInstalledRuntimes(ICLRMetaHost* iface,
95 IEnumUnknown **ppEnumerator)
97 FIXME("%p\n", ppEnumerator);
102 static HRESULT WINAPI CLRMetaHost_EnumerateLoadedRuntimes(ICLRMetaHost* iface,
103 HANDLE hndProcess, IEnumUnknown **ppEnumerator)
105 FIXME("%p %p\n", hndProcess, ppEnumerator);
110 static HRESULT WINAPI CLRMetaHost_RequestRuntimeLoadedNotification(ICLRMetaHost* iface,
111 RuntimeLoadedCallbackFnPtr pCallbackFunction)
113 FIXME("%p\n", pCallbackFunction);
118 static HRESULT WINAPI CLRMetaHost_QueryLegacyV2RuntimeBinding(ICLRMetaHost* iface,
119 REFIID riid, LPVOID *ppUnk)
121 FIXME("%s %p\n", debugstr_guid(riid), ppUnk);
126 static HRESULT WINAPI CLRMetaHost_ExitProcess(ICLRMetaHost* iface, INT32 iExitCode)
128 FIXME("%i: stub\n", iExitCode);
130 ExitProcess(iExitCode);
133 static const struct ICLRMetaHostVtbl CLRMetaHost_vtbl =
135 CLRMetaHost_QueryInterface,
138 CLRMetaHost_GetRuntime,
139 CLRMetaHost_GetVersionFromFile,
140 CLRMetaHost_EnumerateInstalledRuntimes,
141 CLRMetaHost_EnumerateLoadedRuntimes,
142 CLRMetaHost_RequestRuntimeLoadedNotification,
143 CLRMetaHost_QueryLegacyV2RuntimeBinding,
144 CLRMetaHost_ExitProcess
147 static const struct CLRMetaHost GlobalCLRMetaHost = {
151 extern HRESULT CLRMetaHost_CreateInstance(REFIID riid, void **ppobj)
153 return ICLRMetaHost_QueryInterface((ICLRMetaHost*)&GlobalCLRMetaHost, riid, ppobj);