ReactOS 0.4.16-dev-2357-g35d0dfe
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 199 of file mscoree_main.c.

203{
204 HRESULT ret;
205 ICLRRuntimeInfo *info;
206
207 TRACE("(%s, %s, %s, %p, %ld, %s, %s, %p)\n", debugstr_w(pwszVersion),
208 debugstr_w(pwszBuildFlavor), debugstr_w(pwszHostConfigFile), pReserved,
209 startupFlags, debugstr_guid(rclsid), debugstr_guid(riid), ppv);
210
211 *ppv = NULL;
212
213 ret = get_runtime_info(NULL, pwszVersion, pwszHostConfigFile, NULL, startupFlags, 0, TRUE, &info);
214
215 if (SUCCEEDED(ret))
216 {
217 ret = ICLRRuntimeInfo_GetInterface(info, rclsid, riid, ppv);
218
219 ICLRRuntimeInfo_Release(info);
220 }
221
222 return ret;
223}
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
HRESULT get_runtime_info(LPCWSTR exefile, LPCWSTR version, LPCWSTR config_file, IStream *config_stream, DWORD startup_flags, DWORD runtimeinfo_flags, BOOL legacy, ICLRRuntimeInfo **result)
Definition: metahost.c:1904
return ret
Definition: mutex.c:146
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
_Out_ PVOID pReserved
Definition: netsh.h:77
#define TRACE(s)
Definition: solgame.cpp:4

◆ CorExitProcess()

void WINAPI CorExitProcess ( int  exitCode)

Definition at line 319 of file mscoree_main.c.

320{
321 TRACE("(%x)\n", exitCode);
322 CLRMetaHost_ExitProcess(0, exitCode);
323}
HRESULT WINAPI CLRMetaHost_ExitProcess(ICLRMetaHost *iface, INT32 iExitCode)
Definition: metahost.c:1244

◆ 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 336 of file mscoree_main.c.

337{
338 ICLRRuntimeInfo *info;
339 HRESULT ret;
340
341 TRACE("(%p, %ld, %p)!\n", pbuffer, cchBuffer, dwLength);
342
343 if (!dwLength || !pbuffer)
344 return E_POINTER;
345
347
348 if (SUCCEEDED(ret))
349 {
351 ret = ICLRRuntimeInfo_GetRuntimeDirectory(info, pbuffer, dwLength);
352
353 ICLRRuntimeInfo_Release(info);
354 }
355
356 return ret;
357}
static DWORD DWORD * dwLength
Definition: fusion.c:86
static DWORD cchBuffer
Definition: fusion.c:85
#define E_POINTER
Definition: winerror.h:3480

◆ GetCORVersion()

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

Definition at line 359 of file mscoree_main.c.

360{
361 ICLRRuntimeInfo *info;
362 HRESULT ret;
363
364 TRACE("(%p, %ld, %p)!\n", pbuffer, cchBuffer, dwLength);
365
366 if (!dwLength || !pbuffer)
367 return E_POINTER;
368
370
371 if (SUCCEEDED(ret))
372 {
374 ret = ICLRRuntimeInfo_GetVersionString(info, pbuffer, dwLength);
375
376 ICLRRuntimeInfo_Release(info);
377 }
378
379 return ret;
380}

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 399 of file mscoree_main.c.

402{
403 HRESULT ret;
404 ICLRRuntimeInfo *info;
405 DWORD length_dummy;
406
407 TRACE("(%s, %s, %s, 0x%08lx, 0x%08lx, %p, 0x%08lx, %p, %p, 0x%08lx, %p)\n", debugstr_w(pExe),
408 debugstr_w(pwszVersion), debugstr_w(pConfigurationFile), startupFlags, runtimeInfoFlags, pDirectory,
409 dwDirectory, dwDirectoryLength, pVersion, cchBuffer, dwlength);
410
411 if (!dwDirectoryLength) dwDirectoryLength = &length_dummy;
412
413 if (!dwlength) dwlength = &length_dummy;
414
415 ret = get_runtime_info(pExe, pwszVersion, pConfigurationFile, NULL, startupFlags, runtimeInfoFlags, TRUE, &info);
416
417 if (SUCCEEDED(ret))
418 {
419 *dwlength = cchBuffer;
420 ret = ICLRRuntimeInfo_GetVersionString(info, pVersion, dwlength);
421
422 if (SUCCEEDED(ret))
423 {
424 if(pwszVersion)
425 pVersion[0] = pwszVersion[0];
426
427 *dwDirectoryLength = dwDirectory;
428 ret = ICLRRuntimeInfo_GetRuntimeDirectory(info, pDirectory, dwDirectoryLength);
429 }
430
431 ICLRRuntimeInfo_Release(info);
432 }
433
434 return ret;
435}
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 464 of file mscoree_main.c.

465{
467 WCHAR dll_filename[MAX_PATH];
469 static const WCHAR default_version[] = {'v','1','.','1','.','4','3','2','2',0};
470 static const WCHAR slash[] = {'\\',0};
471 DWORD dummy;
472
473 TRACE("(%p %s, %p, %p, %p)\n", szDllName, debugstr_w(szDllName), szVersion, pvReserved, phModDll);
474
475 if (!szDllName || !phModDll)
476 return E_POINTER;
477
478 if (!get_install_root(dll_filename))
479 {
480 ERR("error reading registry key for installroot\n");
481 dll_filename[0] = 0;
482 }
483 else
484 {
485 if (!szVersion)
486 {
488 if (SUCCEEDED(ret))
490 else
491 szVersion = default_version;
492 }
493 lstrcatW(dll_filename, szVersion);
494 lstrcatW(dll_filename, slash);
495 }
496
497 lstrcatW(dll_filename, szDllName);
498
499 *phModDll = LoadLibraryW(dll_filename);
500
501 return *phModDll ? S_OK : E_HANDLE;
502}
#define ERR(fmt,...)
Definition: precomp.h:57
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
LPWSTR WINAPI lstrcatW(LPWSTR lpString1, LPCWSTR lpString2)
Definition: lstring.c:274
static LPCWSTR LPVOID pvReserved
Definition: asmcache.c:749
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:359
static BOOL get_install_root(LPWSTR install_dir)
Definition: mscoree_main.c:78
#define E_HANDLE
Definition: winerror.h:4117
__wchar_t WCHAR
Definition: xmlstorage.h:180

Referenced by CLRRuntimeInfo_LoadLibrary(), create_monodata(), and get_file_from_strongname().

◆ LockClrVersion()

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

Definition at line 504 of file mscoree_main.c.

505{
506 FIXME("(%p %p %p): stub\n", hostCallback, pBeginHostSetup, pEndHostSetup);
507 return S_OK;
508}
#define FIXME(fmt,...)
Definition: precomp.h:53