ReactOS 0.4.16-dev-1020-gf135cab
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 224 of file mscoree_main.c.

225{
226 TRACE("(%x)\n", exitCode);
228 ExitProcess(exitCode);
229}
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 242 of file mscoree_main.c.

243{
245 HRESULT ret;
246
247 TRACE("(%p, %d, %p)!\n", pbuffer, cchBuffer, dwLength);
248
249 if (!dwLength || !pbuffer)
250 return E_POINTER;
251
253
254 if (SUCCEEDED(ret))
255 {
257 ret = ICLRRuntimeInfo_GetRuntimeDirectory(info, pbuffer, dwLength);
258
259 ICLRRuntimeInfo_Release(info);
260 }
261
262 return ret;
263}
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 265 of file mscoree_main.c.

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

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

291{
292 HRESULT ret;
294 DWORD length_dummy;
295
296 TRACE("(%s, %s, %s, 0x%08x, 0x%08x, %p, 0x%08x, %p, %p, 0x%08x, %p)\n", debugstr_w(pExe),
297 debugstr_w(pwszVersion), debugstr_w(pConfigurationFile), startupFlags, runtimeInfoFlags, pDirectory,
298 dwDirectory, dwDirectoryLength, pVersion, cchBuffer, dwlength);
299
300 if (!dwDirectoryLength) dwDirectoryLength = &length_dummy;
301
302 if (!dwlength) dwlength = &length_dummy;
303
304 ret = get_runtime_info(pExe, pwszVersion, pConfigurationFile, startupFlags, runtimeInfoFlags, TRUE, &info);
305
306 if (SUCCEEDED(ret))
307 {
308 *dwlength = cchBuffer;
309 ret = ICLRRuntimeInfo_GetVersionString(info, pVersion, dwlength);
310
311 if (SUCCEEDED(ret))
312 {
313 if(pwszVersion)
314 pVersion[0] = pwszVersion[0];
315
316 *dwDirectoryLength = dwDirectory;
317 ret = ICLRRuntimeInfo_GetRuntimeDirectory(info, pDirectory, dwDirectoryLength);
318 }
319
320 ICLRRuntimeInfo_Release(info);
321 }
322
323 return ret;
324}
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 353 of file mscoree_main.c.

354{
356 WCHAR dll_filename[MAX_PATH];
358 static const WCHAR default_version[] = {'v','1','.','1','.','4','3','2','2',0};
359 static const WCHAR slash[] = {'\\',0};
360 DWORD dummy;
361
362 TRACE("(%p %s, %p, %p, %p)\n", szDllName, debugstr_w(szDllName), szVersion, pvReserved, phModDll);
363
364 if (!szDllName || !phModDll)
365 return E_POINTER;
366
367 if (!get_install_root(dll_filename))
368 {
369 ERR("error reading registry key for installroot\n");
370 dll_filename[0] = 0;
371 }
372 else
373 {
374 if (!szVersion)
375 {
377 if (SUCCEEDED(ret))
379 else
380 szVersion = default_version;
381 }
382 strcatW(dll_filename, szVersion);
383 strcatW(dll_filename, slash);
384 }
385
386 strcatW(dll_filename, szDllName);
387
388 *phModDll = LoadLibraryW(dll_filename);
389
390 return *phModDll ? S_OK : E_HANDLE;
391}
#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
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:265
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 393 of file mscoree_main.c.

394{
395 FIXME("(%p %p %p): stub\n", hostCallback, pBeginHostSetup, pEndHostSetup);
396 return S_OK;
397}
#define FIXME(fmt,...)
Definition: precomp.h:53