ReactOS 0.4.15-dev-8138-g1e75ea8
mscoree.idl File Reference

Go to the source code of this file.

Classes

interface  IGCThreadControl
 
interface  IGCHostControl
 
interface  IDebuggerThreadControl
 
interface  ICorConfiguration
 
interface  ICLRControl
 
interface  IHostControl
 
interface  ICorRuntimeHost
 
interface  ICLRRuntimeHost
 
interface  IManagedObject
 

Typedefs

typedef HRESULT(__stdcallFLockClrVersionCallback) (void)
 
typedef voidHDOMAINENUM
 
typedef enum RUNTIME_INFO_FLAGS RUNTIME_INFO_FLAGS
 
typedef HRESULT(__stdcallFExecuteInAppDomainCallback) ([in] void *cookie)
 

Enumerations

enum  RUNTIME_INFO_FLAGS {
  RUNTIME_INFO_UPGRADE_VERSION = 0x1 , RUNTIME_INFO_REQUEST_IA64 = 0x2 , RUNTIME_INFO_REQUEST_AMD64 = 0x4 , RUNTIME_INFO_REQUEST_X86 = 0x8 ,
  RUNTIME_INFO_DONT_RETURN_DIRECTORY = 0x10 , RUNTIME_INFO_DONT_RETURN_VERSION = 0x20 , RUNTIME_INFO_DONT_SHOW_ERROR_DIALOG = 0x40
}
 

Functions

HRESULT WINAPI CorBindToRuntimeHost (LPCWSTR, LPCWSTR, LPCWSTR, VOID *, DWORD, REFCLSID, REFIID, LPVOID *)
 
void WINAPI CorExitProcess (int)
 
HRESULT WINAPI GetCORSystemDirectory (LPWSTR, DWORD, DWORD *)
 
HRESULT WINAPI GetCORVersion (LPWSTR, DWORD, DWORD *)
 
HRESULT WINAPI GetRequestedRuntimeInfo (LPCWSTR, LPCWSTR, LPCWSTR, DWORD, DWORD, LPWSTR, DWORD, DWORD *, LPWSTR, DWORD, DWORD *)
 
HRESULT WINAPI LoadLibraryShim (LPCWSTR, LPCWSTR, LPVOID, HMODULE *)
 
HRESULT WINAPI LockClrVersion (FLockClrVersionCallback, FLockClrVersionCallback *, FLockClrVersionCallback *)
 
 DEFINE_GUID (CLSID_CorRuntimeHost, 0xcb2f6723, 0xab3a, 0x11d2, 0x9c, 0x40, 0x00, 0xc0, 0x4f, 0xa3, 0x0a, 0x3e)
 
 DEFINE_GUID (CLSID_CLRRuntimeHost, 0x90f1a06e, 0x7712, 0x4762, 0x86, 0xb5, 0x7a, 0x5e, 0xba, 0x6b, 0xdb, 0x02)
 

Typedef Documentation

◆ FExecuteInAppDomainCallback

typedef HRESULT(__stdcall * FExecuteInAppDomainCallback) ([in] void *cookie)

Definition at line 49 of file mscoree.idl.

◆ FLockClrVersionCallback

typedef HRESULT(__stdcall * FLockClrVersionCallback) ()

Definition at line 31 of file mscoree.idl.

◆ HDOMAINENUM

typedef void* HDOMAINENUM

Definition at line 37 of file mscoree.idl.

◆ RUNTIME_INFO_FLAGS

Enumeration Type Documentation

◆ RUNTIME_INFO_FLAGS

Enumerator
RUNTIME_INFO_UPGRADE_VERSION 
RUNTIME_INFO_REQUEST_IA64 
RUNTIME_INFO_REQUEST_AMD64 
RUNTIME_INFO_REQUEST_X86 
RUNTIME_INFO_DONT_RETURN_DIRECTORY 
RUNTIME_INFO_DONT_RETURN_VERSION 
RUNTIME_INFO_DONT_SHOW_ERROR_DIALOG 

Definition at line 39 of file mscoree.idl.

39 {
RUNTIME_INFO_FLAGS
Definition: mscoree.idl:39
@ RUNTIME_INFO_REQUEST_IA64
Definition: mscoree.idl:41
@ RUNTIME_INFO_REQUEST_X86
Definition: mscoree.idl:43
@ RUNTIME_INFO_UPGRADE_VERSION
Definition: mscoree.idl:40
@ RUNTIME_INFO_DONT_RETURN_DIRECTORY
Definition: mscoree.idl:44
@ RUNTIME_INFO_DONT_RETURN_VERSION
Definition: mscoree.idl:45
@ RUNTIME_INFO_REQUEST_AMD64
Definition: mscoree.idl:42
@ RUNTIME_INFO_DONT_SHOW_ERROR_DIALOG
Definition: mscoree.idl:46

Function Documentation

◆ CorBindToRuntimeHost()

HRESULT WINAPI CorBindToRuntimeHost ( LPCWSTR  pwszVersion,
LPCWSTR  pwszBuildFlavor,
LPCWSTR  pwszHostConfigFile,
VOID pReserved,
DWORD  startupFlags,
REFCLSID  rclsid,
REFIID  riid,
LPVOID ppv 
)

Definition at line 166 of file mscoree_main.c.

170{
171 HRESULT ret;
173
174 TRACE("(%s, %s, %s, %p, %d, %s, %s, %p)\n", debugstr_w(pwszVersion),
175 debugstr_w(pwszBuildFlavor), debugstr_w(pwszHostConfigFile), pReserved,
176 startupFlags, debugstr_guid(rclsid), debugstr_guid(riid), ppv);
177
178 *ppv = NULL;
179
180 ret = get_runtime_info(NULL, pwszVersion, pwszHostConfigFile, startupFlags, 0, TRUE, &info);
181
182 if (SUCCEEDED(ret))
183 {
184 ret = ICLRRuntimeInfo_GetInterface(info, rclsid, riid, ppv);
185
186 ICLRRuntimeInfo_Release(info);
187 }
188
189 return ret;
190}
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
HRESULT get_runtime_info(LPCWSTR exefile, LPCWSTR version, LPCWSTR config_file, DWORD startup_flags, DWORD runtimeinfo_flags, BOOL legacy, ICLRRuntimeInfo **result)
Definition: metahost.c:1247
REFIID riid
Definition: atlbase.h:39
REFIID LPVOID * ppv
Definition: atlbase.h:39
#define SUCCEEDED(hr)
Definition: intsafe.h:50
#define debugstr_guid
Definition: kernel32.h:35
#define debugstr_w
Definition: kernel32.h:32
#define TRACE(s)
Definition: solgame.cpp:4
int ret

◆ CorExitProcess()

void WINAPI CorExitProcess ( int  exitCode)

Definition at line 222 of file mscoree_main.c.

223{
224 TRACE("(%x)\n", exitCode);
226 ExitProcess(exitCode);
227}
VOID WINAPI ExitProcess(IN UINT uExitCode)
Definition: proc.c:1487
void unload_all_runtimes(void)
Definition: metahost.c:266

◆ DEFINE_GUID() [1/2]

DEFINE_GUID ( CLSID_CLRRuntimeHost  ,
0x90f1a06e  ,
0x7712  ,
0x4762  ,
0x86  ,
0xb5  ,
0x7a  ,
0x5e  ,
0xba  ,
0x6b  ,
0xdb  ,
0x02   
)

◆ DEFINE_GUID() [2/2]

DEFINE_GUID ( CLSID_CorRuntimeHost  ,
0xcb2f6723  ,
0xab3a  ,
0x11d2  ,
0x9c  ,
0x40  ,
0x00  ,
0xc0  ,
0x4f  ,
0xa3  ,
0x0a  ,
0x3e   
)

◆ GetCORSystemDirectory()

HRESULT WINAPI GetCORSystemDirectory ( LPWSTR  pbuffer,
DWORD  cchBuffer,
DWORD dwLength 
)

Definition at line 240 of file mscoree_main.c.

241{
243 HRESULT ret;
244
245 TRACE("(%p, %d, %p)!\n", pbuffer, cchBuffer, dwLength);
246
247 if (!dwLength || !pbuffer)
248 return E_POINTER;
249
251
252 if (SUCCEEDED(ret))
253 {
255 ret = ICLRRuntimeInfo_GetRuntimeDirectory(info, pbuffer, dwLength);
256
257 ICLRRuntimeInfo_Release(info);
258 }
259
260 return ret;
261}
static DWORD DWORD * dwLength
Definition: fusion.c:86
static DWORD cchBuffer
Definition: fusion.c:85
#define E_POINTER
Definition: winerror.h:2365

◆ GetCORVersion()

HRESULT WINAPI GetCORVersion ( LPWSTR  pbuffer,
DWORD  cchBuffer,
DWORD dwLength 
)

Definition at line 263 of file mscoree_main.c.

264{
266 HRESULT ret;
267
268 TRACE("(%p, %d, %p)!\n", pbuffer, cchBuffer, dwLength);
269
270 if (!dwLength || !pbuffer)
271 return E_POINTER;
272
274
275 if (SUCCEEDED(ret))
276 {
278 ret = ICLRRuntimeInfo_GetVersionString(info, pbuffer, dwLength);
279
280 ICLRRuntimeInfo_Release(info);
281 }
282
283 return ret;
284}

Referenced by LoadLibraryShim().

◆ GetRequestedRuntimeInfo()

HRESULT WINAPI GetRequestedRuntimeInfo ( LPCWSTR  pExe,
LPCWSTR  pwszVersion,
LPCWSTR  pConfigurationFile,
DWORD  startupFlags,
DWORD  runtimeInfoFlags,
LPWSTR  pDirectory,
DWORD  dwDirectory,
DWORD dwDirectoryLength,
LPWSTR  pVersion,
DWORD  cchBuffer,
DWORD dwlength 
)

Definition at line 286 of file mscoree_main.c.

289{
290 HRESULT ret;
292 DWORD length_dummy;
293
294 TRACE("(%s, %s, %s, 0x%08x, 0x%08x, %p, 0x%08x, %p, %p, 0x%08x, %p)\n", debugstr_w(pExe),
295 debugstr_w(pwszVersion), debugstr_w(pConfigurationFile), startupFlags, runtimeInfoFlags, pDirectory,
296 dwDirectory, dwDirectoryLength, pVersion, cchBuffer, dwlength);
297
298 if (!dwDirectoryLength) dwDirectoryLength = &length_dummy;
299
300 if (!dwlength) dwlength = &length_dummy;
301
302 ret = get_runtime_info(pExe, pwszVersion, pConfigurationFile, startupFlags, runtimeInfoFlags, TRUE, &info);
303
304 if (SUCCEEDED(ret))
305 {
306 *dwlength = cchBuffer;
307 ret = ICLRRuntimeInfo_GetVersionString(info, pVersion, dwlength);
308
309 if (SUCCEEDED(ret))
310 {
311 if(pwszVersion)
312 pVersion[0] = pwszVersion[0];
313
314 *dwDirectoryLength = dwDirectory;
315 ret = ICLRRuntimeInfo_GetRuntimeDirectory(info, pDirectory, dwDirectoryLength);
316 }
317
318 ICLRRuntimeInfo_Release(info);
319 }
320
321 return ret;
322}
unsigned long DWORD
Definition: ntddk_ex.h:95

Referenced by GetRequestedRuntimeVersion().

◆ LoadLibraryShim()

HRESULT WINAPI LoadLibraryShim ( LPCWSTR  szDllName,
LPCWSTR  szVersion,
LPVOID  pvReserved,
HMODULE phModDll 
)

Definition at line 351 of file mscoree_main.c.

352{
354 WCHAR dll_filename[MAX_PATH];
356 static const WCHAR default_version[] = {'v','1','.','1','.','4','3','2','2',0};
357 static const WCHAR slash[] = {'\\',0};
358 DWORD dummy;
359
360 TRACE("(%p %s, %p, %p, %p)\n", szDllName, debugstr_w(szDllName), szVersion, pvReserved, phModDll);
361
362 if (!szDllName || !phModDll)
363 return E_POINTER;
364
365 if (!get_install_root(dll_filename))
366 {
367 ERR("error reading registry key for installroot\n");
368 dll_filename[0] = 0;
369 }
370 else
371 {
372 if (!szVersion)
373 {
375 if (SUCCEEDED(ret))
377 else
378 szVersion = default_version;
379 }
380 strcatW(dll_filename, szVersion);
381 strcatW(dll_filename, slash);
382 }
383
384 strcatW(dll_filename, szDllName);
385
386 *phModDll = LoadLibraryW(dll_filename);
387
388 return *phModDll ? S_OK : E_HANDLE;
389}
#define ERR(fmt,...)
Definition: debug.h:113
static const WCHAR szDllName[]
Definition: sip.c:61
#define MAX_PATH
Definition: compat.h:34
#define LoadLibraryW(x)
Definition: compat.h:747
static const WCHAR version[]
Definition: asmname.c:66
#define S_OK
Definition: intsafe.h:52
static LPCSTR DWORD void * pvReserved
Definition: str.c:196
static LPCWSTR szVersion
Definition: asmcache.c:748
static LPCWSTR LPVOID HMODULE * phModDll
Definition: asmcache.c:749
HRESULT WINAPI GetCORVersion(LPWSTR pbuffer, DWORD cchBuffer, DWORD *dwLength)
Definition: mscoree_main.c:263
static BOOL get_install_root(LPWSTR install_dir)
Definition: mscoree_main.c:45
#define strcatW(d, s)
Definition: unicode.h:36
#define E_HANDLE
Definition: winerror.h:2850
__wchar_t WCHAR
Definition: xmlstorage.h:180

Referenced by CLRRuntimeInfo_LoadLibrary(), and mono_assembly_search_hook_fn().

◆ LockClrVersion()

HRESULT WINAPI LockClrVersion ( FLockClrVersionCallback  hostCallback,
FLockClrVersionCallback pBeginHostSetup,
FLockClrVersionCallback pEndHostSetup 
)

Definition at line 391 of file mscoree_main.c.

392{
393 FIXME("(%p %p %p): stub\n", hostCallback, pBeginHostSetup, pEndHostSetup);
394 return S_OK;
395}
#define FIXME(fmt,...)
Definition: debug.h:114