ReactOS  0.4.13-dev-563-g0561610
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.

Function Documentation

◆ CorBindToRuntimeHost()

HRESULT WINAPI CorBindToRuntimeHost ( LPCWSTR  ,
LPCWSTR  ,
LPCWSTR  ,
VOID ,
DWORD  ,
REFCLSID  ,
REFIID  ,
LPVOID  
)

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 TRUE
Definition: types.h:120
REFIID riid
Definition: precomp.h:44
REFIID LPVOID * ppv
Definition: atlbase.h:39
struct _test_info info[]
Definition: SetCursorPos.c:19
#define debugstr_w
Definition: kernel32.h:32
smooth NULL
Definition: ftsmooth.c:416
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:77
int ret
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
#define SUCCEEDED(hr)
Definition: intsafe.h:57

◆ CorExitProcess()

void WINAPI CorExitProcess ( int  )

Definition at line 222 of file mscoree_main.c.

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

◆ DEFINE_GUID() [1/2]

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

◆ DEFINE_GUID() [2/2]

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

◆ GetCORSystemDirectory()

HRESULT WINAPI GetCORSystemDirectory ( LPWSTR  ,
DWORD  ,
DWORD  
)

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  {
254  *dwLength = cchBuffer;
255  ret = ICLRRuntimeInfo_GetRuntimeDirectory(info, pbuffer, dwLength);
256 
257  ICLRRuntimeInfo_Release(info);
258  }
259 
260  return ret;
261 }
#define TRUE
Definition: types.h:120
struct _test_info info[]
Definition: SetCursorPos.c:19
static DWORD cchBuffer
Definition: fusion.c:83
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
static DWORD DWORD * dwLength
Definition: fusion.c:83
LONG HRESULT
Definition: typedefs.h:77
int ret
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
#define E_POINTER
Definition: winerror.h:2365
#define SUCCEEDED(hr)
Definition: intsafe.h:57

◆ GetCORVersion()

HRESULT WINAPI GetCORVersion ( LPWSTR  ,
DWORD  ,
DWORD  
)

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  {
277  *dwLength = cchBuffer;
278  ret = ICLRRuntimeInfo_GetVersionString(info, pbuffer, dwLength);
279 
280  ICLRRuntimeInfo_Release(info);
281  }
282 
283  return ret;
284 }
#define TRUE
Definition: types.h:120
struct _test_info info[]
Definition: SetCursorPos.c:19
static DWORD cchBuffer
Definition: fusion.c:83
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
static DWORD DWORD * dwLength
Definition: fusion.c:83
LONG HRESULT
Definition: typedefs.h:77
int ret
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
#define E_POINTER
Definition: winerror.h:2365
#define SUCCEEDED(hr)
Definition: intsafe.h:57

Referenced by LoadLibraryShim().

◆ GetRequestedRuntimeInfo()

HRESULT WINAPI GetRequestedRuntimeInfo ( LPCWSTR  ,
LPCWSTR  ,
LPCWSTR  ,
DWORD  ,
DWORD  ,
LPWSTR  ,
DWORD  ,
DWORD ,
LPWSTR  ,
DWORD  ,
DWORD  
)

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 }
#define TRUE
Definition: types.h:120
struct _test_info info[]
Definition: SetCursorPos.c:19
#define debugstr_w
Definition: kernel32.h:32
static DWORD cchBuffer
Definition: fusion.c:83
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:77
unsigned long DWORD
Definition: ntddk_ex.h:95
int ret
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
#define SUCCEEDED(hr)
Definition: intsafe.h:57

Referenced by GetRequestedRuntimeVersion().

◆ LoadLibraryShim()

HRESULT WINAPI LoadLibraryShim ( LPCWSTR  ,
LPCWSTR  ,
LPVOID  ,
HMODULE  
)

Definition at line 351 of file mscoree_main.c.

352 {
353  HRESULT ret=S_OK;
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))
376  szVersion = version;
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 E_HANDLE
Definition: winerror.h:2850
HRESULT WINAPI GetCORVersion(LPWSTR pbuffer, DWORD cchBuffer, DWORD *dwLength)
Definition: mscoree_main.c:263
static const WCHAR szDllName[]
Definition: sip.c:61
#define debugstr_w
Definition: kernel32.h:32
#define LoadLibraryW(x)
Definition: compat.h:404
static const WCHAR version[]
Definition: asmname.c:64
static BOOL get_install_root(LPWSTR install_dir)
Definition: mscoree_main.c:45
#define TRACE(s)
Definition: solgame.cpp:4
__wchar_t WCHAR
Definition: xmlstorage.h:180
LONG HRESULT
Definition: typedefs.h:77
static LPCSTR DWORD void * pvReserved
Definition: str.c:196
#define MAX_PATH
Definition: compat.h:26
unsigned long DWORD
Definition: ntddk_ex.h:95
static LPCWSTR szVersion
Definition: asmcache.c:748
int ret
#define ERR(fmt,...)
Definition: debug.h:109
#define S_OK
Definition: intsafe.h:59
unsigned char dummy
Definition: maze.c:118
WINE_UNICODE_INLINE WCHAR * strcatW(WCHAR *dst, const WCHAR *src)
Definition: unicode.h:242
static LPCWSTR LPVOID HMODULE * phModDll
Definition: asmcache.c:748
#define E_POINTER
Definition: winerror.h:2365
#define SUCCEEDED(hr)
Definition: intsafe.h:57

Referenced by CLRRuntimeInfo_LoadLibrary(), and mono_assembly_search_hook_fn().

◆ LockClrVersion()

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:110
#define S_OK
Definition: intsafe.h:59