include: Add the missing guiddef.h include directives.
[wine] / include / metahost.idl
1 /*
2  * Copyright 2010 Vincent Povirk for CodeWeavers
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2.1 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the Free Software
16  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
17  */
18
19 import "wtypes.idl";
20 import "propidl.idl";
21
22 cpp_quote("#ifdef WINE_NO_UNICODE_MACROS")
23 cpp_quote("#undef LoadLibrary")
24 cpp_quote("#endif")
25
26 [
27     object,
28     local,
29     uuid(bd39d1d2-ba2f-486a-89b0-b4b0cb466891)
30 ]
31 interface ICLRRuntimeInfo : IUnknown
32 {
33     HRESULT GetVersionString(
34         [out, size_is(*pcchBuffer)] LPWSTR pwzBuffer,
35         [in, out] DWORD *pcchBuffer);
36
37     HRESULT GetRuntimeDirectory(
38         [out, size_is(*pcchBuffer)] LPWSTR pwzBuffer,
39         [in, out] DWORD *pcchBuffer);
40
41     HRESULT IsLoaded(
42         [in] HANDLE hndProcess,
43         [out, retval] BOOL *pbLoaded);
44
45     HRESULT LoadErrorString(
46         [in] UINT iResourceID,
47         [out, size_is(*pcchBuffer)] LPWSTR pwzBuffer,
48         [in, out] DWORD *pcchBuffer,
49         [in] LONG iLocaleid);
50
51     HRESULT LoadLibrary(
52         [in] LPCWSTR pwzDllName,
53         [out, retval] HMODULE *phndModule);
54
55     HRESULT GetProcAddress(
56         [in] LPCSTR pszProcName,
57         [out, retval] LPVOID *ppProc);
58
59     HRESULT GetInterface(
60         [in] REFCLSID rclsid,
61         [in] REFIID riid,
62         [out, iid_is(riid), retval] LPVOID *ppUnk);
63
64     HRESULT IsLoadable(
65         [out, retval] BOOL *pbLoadable);
66
67     HRESULT SetDefaultStartupFlags(
68         [in] DWORD dwStartupFlags,
69         [in] LPCWSTR pwzHostConfigFile);
70
71     HRESULT GetDefaultStartupFlags(
72         [out] DWORD *pdwStartupFlags,
73         [out, size_is(*pcchHostConfigFile)] LPWSTR pwzHostConfigFile,
74         [in, out] DWORD *pcchHostConfigFile);
75
76     HRESULT BindAsLegacyV2Runtime();
77
78     HRESULT IsStarted(
79         [out] BOOL *pbStarted,
80         [out] DWORD *pdwStartupFlags);
81 };
82
83 typedef HRESULT (__stdcall *CallbackThreadSetFnPtr)();
84 typedef HRESULT (__stdcall *CallbackThreadUnsetFnPtr)();
85
86 typedef void (__stdcall *RuntimeLoadedCallbackFnPtr)(
87     ICLRRuntimeInfo *pRuntimeInfo,
88     CallbackThreadSetFnPtr pfnCallbackThreadSet,
89     CallbackThreadUnsetFnPtr pfnCallbackThreadUnset);
90
91 cpp_quote("DEFINE_GUID(CLSID_CLRDebuggingLegacy, 0xDF8395B5,0xA4BA,0x450b,0xA7,0x7C,0xA9,0xA4,0x77,0x62,0xC5,0x20);")
92 cpp_quote("DEFINE_GUID(CLSID_CLRMetaHost, 0x9280188d,0x0e8e,0x4867,0xb3,0x0c,0x7f,0xa8,0x38,0x84,0xe8,0xde);")
93
94 [
95     object,
96     local,
97     uuid(d332db9e-b9b3-4125-8207-a14884f53216)
98 ]
99 interface ICLRMetaHost : IUnknown
100 {
101     HRESULT GetRuntime(
102         [in] LPCWSTR pwzVersion,
103         [in] REFIID iid,
104         [out, iid_is(iid), retval] LPVOID *ppRuntime);
105
106     HRESULT GetVersionFromFile(
107         [in] LPCWSTR pwzFilePath,
108         [out, size_is(*pcchBuffer)] LPWSTR pwzBuffer,
109         [in, out] DWORD *pcchBuffer);
110
111     HRESULT EnumerateInstalledRuntimes(
112         [out, retval] IEnumUnknown **ppEnumerator);
113
114     HRESULT EnumerateLoadedRuntimes(
115         [in] HANDLE hndProcess,
116         [out, retval] IEnumUnknown **ppEnumerator);
117
118     HRESULT RequestRuntimeLoadedNotification(
119         [in] RuntimeLoadedCallbackFnPtr pCallbackFunction);
120
121     HRESULT QueryLegacyV2RuntimeBinding(
122         [in] REFIID riid,
123         [out, iid_is(riid), retval] LPVOID *ppUnk);
124
125     HRESULT ExitProcess(
126         [in] INT32 iExitCode);
127 };
128
129 cpp_quote("HRESULT WINAPI CLRCreateInstance(REFCLSID clsid, REFIID riid, LPVOID *ppInterface);")