ReactOS 0.4.16-dev-983-g23ad936
mscoree_main.c
Go to the documentation of this file.
1/*
2 * Implementation of mscoree.dll
3 * Microsoft Component Object Runtime Execution Engine
4 *
5 * Copyright 2006 Paul Chitescu
6 *
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
11 *
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
20 */
21
22#include "mscoree_private.h"
23
24#include <rpcproxy.h>
25
27
29
30char *WtoA(LPCWSTR wstr)
31{
32 int length;
33 char *result;
34
35 length = WideCharToMultiByte(CP_UTF8, 0, wstr, -1, NULL, 0, NULL, NULL);
36
38
39 if (result)
41
42 return result;
43}
44
45static BOOL get_install_root(LPWSTR install_dir)
46{
47 const WCHAR dotnet_key[] = {'S','O','F','T','W','A','R','E','\\','M','i','c','r','o','s','o','f','t','\\','.','N','E','T','F','r','a','m','e','w','o','r','k','\\',0};
48 const WCHAR install_root[] = {'I','n','s','t','a','l','l','R','o','o','t',0};
49
50 DWORD len;
51 HKEY key;
52
53 if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, dotnet_key, 0, KEY_READ, &key))
54 return FALSE;
55
56 len = MAX_PATH * sizeof(WCHAR);
57 if (RegQueryValueExW(key, install_root, 0, NULL, (LPBYTE)install_dir, &len))
58 {
60 return FALSE;
61 }
63
64 return TRUE;
65}
66
67typedef struct mscorecf
68{
71
73
76
78{
79 return CONTAINING_RECORD(iface, mscorecf, IClassFactory_iface);
80}
81
83{
84 TRACE("%s %p\n", debugstr_guid(riid), ppobj);
85
88 {
89 IClassFactory_AddRef( iface );
90 *ppobj = iface;
91 return S_OK;
92 }
93
94 ERR("interface %s not implemented\n", debugstr_guid(riid));
95 return E_NOINTERFACE;
96}
97
99{
102
103 TRACE("%p ref=%u\n", This, ref);
104
105 return ref;
106}
107
109{
112
113 TRACE("%p ref=%u\n", This, ref);
114
115 if (ref == 0)
116 {
118 }
119
120 return ref;
121}
122
124 REFIID riid, LPVOID *ppobj )
125{
127 HRESULT hr;
128 IUnknown *punk;
129
130 TRACE("%p %s %p\n", pOuter, debugstr_guid(riid), ppobj );
131
132 *ppobj = NULL;
133
134 if (pOuter)
136
137 hr = This->pfnCreateInstance( &This->clsid, (LPVOID*) &punk );
138 if (SUCCEEDED(hr))
139 {
140 hr = IUnknown_QueryInterface( punk, riid, ppobj );
141
142 IUnknown_Release( punk );
143 }
144 else
145 {
146 WARN("Cannot create an instance object. 0x%08x\n", hr);
147 }
148 return hr;
149}
150
152{
153 FIXME("(%p)->(%d),stub!\n",iface,dolock);
154 return S_OK;
155}
156
157static const struct IClassFactoryVtbl mscorecf_vtbl =
158{
164};
165
166HRESULT WINAPI CorBindToRuntimeHost(LPCWSTR pwszVersion, LPCWSTR pwszBuildFlavor,
167 LPCWSTR pwszHostConfigFile, VOID *pReserved,
168 DWORD startupFlags, REFCLSID rclsid,
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}
191
193{
194 TRACE("(%p, %d, %p)\n", hinstDLL, fdwReason, lpvReserved);
195
196 MSCOREE_hInstance = hinstDLL;
197
198 switch (fdwReason)
199 {
200#ifndef __REACTOS__
201 case DLL_WINE_PREATTACH:
202 return FALSE; /* prefer native version */
203#endif
207 break;
210 if (lpvReserved) break; /* process is terminating */
212 break;
213 }
214 return TRUE;
215}
216
217__int32 WINAPI _CorExeMain2(PBYTE ptrMemory, DWORD cntMemory, LPWSTR imageName, LPWSTR loaderName, LPWSTR cmdLine)
218{
219 TRACE("(%p, %u, %s, %s, %s)\n", ptrMemory, cntMemory, debugstr_w(imageName), debugstr_w(loaderName), debugstr_w(cmdLine));
220 FIXME("Directly running .NET applications not supported.\n");
221 return -1;
222}
223
224void WINAPI CorExitProcess(int exitCode)
225{
226 TRACE("(%x)\n", exitCode);
228 ExitProcess(exitCode);
229}
230
232{
233 TRACE("(%p): stub\n", imageBase);
234}
235
237{
238 TRACE("(%p, %s): stub\n", imageBase, debugstr_w(imageName));
239 return E_FAIL;
240}
241
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}
264
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}
287
288HRESULT WINAPI GetRequestedRuntimeInfo(LPCWSTR pExe, LPCWSTR pwszVersion, LPCWSTR pConfigurationFile,
289 DWORD startupFlags, DWORD runtimeInfoFlags, LPWSTR pDirectory, DWORD dwDirectory, DWORD *dwDirectoryLength,
290 LPWSTR pVersion, DWORD cchBuffer, DWORD *dwlength)
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}
325
327{
328 TRACE("(%s, %p, %d, %p)\n", debugstr_w(pExe), pVersion, cchBuffer, dwlength);
329
330 if(!dwlength)
331 return E_POINTER;
332
333 return GetRequestedRuntimeInfo(pExe, NULL, NULL, 0, 0, NULL, 0, NULL, pVersion, cchBuffer, dwlength);
334}
335
337{
338 FIXME("(%s, %p)\n", debugstr_a(procname), ppv);
340}
341
343{
344 TRACE("(%s, %p, %d, %p)\n", debugstr_w(szFilename), szBuffer, cchBuffer, dwLength);
345
346 if (!szFilename || !dwLength)
347 return E_POINTER;
348
350 return CLRMetaHost_GetVersionFromFile(0, szFilename, szBuffer, dwLength);
351}
352
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}
392
394{
395 FIXME("(%p %p %p): stub\n", hostCallback, pBeginHostSetup, pEndHostSetup);
396 return S_OK;
397}
398
400{
401 FIXME("(0x%08x): stub\n", fFlags);
402 return S_OK;
403}
404
406{
407 FIXME("(%p %s, %s, %p): stub\n", szFileName, debugstr_w(szFileName), debugstr_guid(riid), *ppIUnk);
409}
410
412{
413 FIXME("(%p, %p, %d, %p): stub\n", hProcess, pVersion, cchBuffer, dwLength);
414 return E_NOTIMPL;
415}
416
417HRESULT WINAPI LoadStringRCEx(LCID culture, UINT resId, LPWSTR pBuffer, int iBufLen, int bQuiet, int* pBufLen)
418{
419 HRESULT res = S_OK;
420 if ((iBufLen <= 0) || !pBuffer)
421 return E_INVALIDARG;
422 pBuffer[0] = 0;
423 if (resId) {
424 FIXME("(%d, %x, %p, %d, %d, %p): semi-stub\n", culture, resId, pBuffer, iBufLen, bQuiet, pBufLen);
425 res = E_NOTIMPL;
426 }
427 else
428 res = E_FAIL;
429 if (pBufLen)
430 *pBufLen = lstrlenW(pBuffer);
431 return res;
432}
433
434HRESULT WINAPI LoadStringRC(UINT resId, LPWSTR pBuffer, int iBufLen, int bQuiet)
435{
436 return LoadStringRCEx(-1, resId, pBuffer, iBufLen, bQuiet, NULL);
437}
438
441{
442 HRESULT ret;
444
445 TRACE("%s %s %d %s %s %p\n", debugstr_w(szVersion), debugstr_w(szBuildFlavor), nflags, debugstr_guid( rslsid ),
447
448 *ppv = NULL;
449
451
452 if (SUCCEEDED(ret))
453 {
454 ret = ICLRRuntimeInfo_GetInterface(info, rslsid, riid, ppv);
455
456 ICLRRuntimeInfo_Release(info);
457 }
458
459 return ret;
460}
461
463{
464 FIXME("(%s, %s, %s, %p): stub\n", debugstr_w(filename), debugstr_guid(rclsid), debugstr_guid(riid), ppv);
465 return E_NOTIMPL;
466}
467
469{
470 HRESULT ret;
474 IUnknown *unk;
475
476 TRACE("(%s,%s,%p)\n", debugstr_w(pTypeName), debugstr_guid(riid), ppObject);
477
478 /* FIXME: How to determine which runtime version to use? */
480
481 if (SUCCEEDED(ret))
482 {
484
485 ICLRRuntimeInfo_Release(info);
486 }
487
488 if (SUCCEEDED(ret))
490
491 if (SUCCEEDED(ret))
493
494 if (SUCCEEDED(ret))
495 {
496 ret = IUnknown_QueryInterface(unk, riid, ppObject);
497 IUnknown_Release(unk);
498 }
499
500 return ret;
501}
502
504{
505 FIXME("(%s, 0x%X, %p): stub\n", debugstr_w(filename), inFlags, pOutFlags);
506 return FALSE;
507}
508
510{
511 FIXME("(%s, %u, %p): stub\n", debugstr_w(filename), forceVerification, pVerified);
512 return FALSE;
513}
514
516{
517 FIXME("(%s, %p): stub\n", debugstr_w(filename), stream);
518 return E_NOTIMPL;
519}
520
522{
523 const WCHAR v2_0[] = {'v','2','.','0','.','5','0','7','2','7',0};
524 HRESULT hr = E_FAIL;
525 ICLRRuntimeInfo *runtimeinfo;
526
527 if(nDebugVersion < 1 || nDebugVersion > 4)
528 return E_INVALIDARG;
529
530 TRACE("(%d %s, %p): stub\n", nDebugVersion, debugstr_w(version), ppv);
531
532 if(!ppv)
533 return E_INVALIDARG;
534
535 *ppv = NULL;
536
537 if(strcmpW(version, v2_0) != 0)
538 {
539 FIXME("Currently .NET Version '%s' not support.\n", debugstr_w(version));
540 return E_INVALIDARG;
541 }
542
543 if(nDebugVersion != 3)
544 return E_INVALIDARG;
545
546 hr = CLRMetaHost_GetRuntime(0, version, &IID_ICLRRuntimeInfo, (void**)&runtimeinfo);
547 if(hr == S_OK)
548 {
549 hr = ICLRRuntimeInfo_GetInterface(runtimeinfo, &CLSID_CLRDebuggingLegacy, &IID_ICorDebug, (void**)ppv);
550
551 ICLRRuntimeInfo_Release(runtimeinfo);
552 }
553
554 if(!*ppv)
555 return E_FAIL;
556
557 return hr;
558}
559
561{
563
564 if (IsEqualGUID(clsid, &CLSID_CLRMetaHost))
566
567 FIXME("not implemented for class %s\n", debugstr_guid(clsid));
568
570}
571
573{
574 mscorecf *This;
575 HRESULT hr;
576
577 TRACE("(%s, %s, %p): stub\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv);
578
579 if(!ppv)
580 return E_INVALIDARG;
581
582 This = HeapAlloc(GetProcessHeap(), 0, sizeof(mscorecf));
583
584 This->IClassFactory_iface.lpVtbl = &mscorecf_vtbl;
585 This->pfnCreateInstance = &create_monodata;
586 This->ref = 1;
587 This->clsid = *rclsid;
588
589 hr = IClassFactory_QueryInterface( &This->IClassFactory_iface, riid, ppv );
590 IClassFactory_Release(&This->IClassFactory_iface);
591
592 return hr;
593}
594
596{
598}
599
601{
603}
604
606{
607 return S_FALSE;
608}
609
611{
612 FIXME("stub.\n");
613}
614
615INT WINAPI ND_RU1( const void *ptr, INT offset )
616{
617 return *((const BYTE *)ptr + offset);
618}
619
620INT WINAPI ND_RI2( const void *ptr, INT offset )
621{
622 return *(const SHORT *)((const BYTE *)ptr + offset);
623}
624
625INT WINAPI ND_RI4( const void *ptr, INT offset )
626{
627 return *(const INT *)((const BYTE *)ptr + offset);
628}
629
631{
632 return *(const INT64 *)((const BYTE *)ptr + offset);
633}
634
636{
637 *((BYTE *)ptr + offset) = val;
638}
639
641{
642 *(SHORT *)((BYTE *)ptr + offset) = val;
643}
644
646{
647 *(INT *)((BYTE *)ptr + offset) = val;
648}
649
651{
652 *(INT64 *)((BYTE *)ptr + offset) = val;
653}
654
655void WINAPI ND_CopyObjDst( const void *src, void *dst, INT offset, INT size )
656{
657 memcpy( (BYTE *)dst + offset, src, size );
658}
659
660void WINAPI ND_CopyObjSrc( const void *src, INT offset, void *dst, INT size )
661{
662 memcpy( dst, (const BYTE *)src + offset, size );
663}
signed long long INT64
static DWORD const fdwReason
#define InterlockedIncrement
Definition: armddk.h:53
#define InterlockedDecrement
Definition: armddk.h:52
#define FIXME(fmt,...)
Definition: precomp.h:53
#define WARN(fmt,...)
Definition: precomp.h:61
#define ERR(fmt,...)
Definition: precomp.h:57
HRESULT WINAPI DllCanUnloadNow(void)
Definition: misc.cpp:154
#define STDAPI
Definition: basetyps.h:41
#define __int32
Definition: basetyps.h:19
const GUID IID_IUnknown
const GUID IID_IClassFactory
#define RegCloseKey(hKey)
Definition: registry.h:49
#define CLR_E_SHIM_RUNTIMEEXPORT
Definition: corerror.h:128
void runtimehost_uninit(void)
void runtimehost_init(void)
HRESULT RuntimeHost_CreateManagedInstance(RuntimeHost *This, LPCWSTR name, MonoDomain *domain, MonoObject **result)
HRESULT RuntimeHost_GetIUnknownForObject(RuntimeHost *This, MonoObject *obj, IUnknown **ppUnk)
HRESULT create_monodata(REFIID riid, LPVOID *ppObj)
#define E_INVALIDARG
Definition: ddrawi.h:101
#define E_NOTIMPL
Definition: ddrawi.h:99
#define E_FAIL
Definition: ddrawi.h:102
static IUnknown **const WCHAR v2_0[]
Definition: debugging.c:37
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
LONG WINAPI RegOpenKeyExW(HKEY hKey, LPCWSTR lpSubKey, DWORD ulOptions, REGSAM samDesired, PHKEY phkResult)
Definition: reg.c:3333
LONG WINAPI RegQueryValueExW(_In_ HKEY hkeyorg, _In_ LPCWSTR name, _In_ LPDWORD reserved, _In_ LPDWORD type, _In_ LPBYTE data, _In_ LPDWORD count)
Definition: reg.c:4103
static const WCHAR szDllName[]
Definition: sip.c:61
#define GetProcessHeap()
Definition: compat.h:736
#define ERROR_CALL_NOT_IMPLEMENTED
Definition: compat.h:102
#define DLL_PROCESS_ATTACH
Definition: compat.h:131
#define DLL_PROCESS_DETACH
Definition: compat.h:130
#define HeapAlloc
Definition: compat.h:733
#define MAX_PATH
Definition: compat.h:34
#define HeapFree(x, y, z)
Definition: compat.h:735
#define WideCharToMultiByte
Definition: compat.h:111
#define LoadLibraryW(x)
Definition: compat.h:747
#define lstrlenW
Definition: compat.h:750
static const WCHAR version[]
Definition: asmname.c:66
static const WCHAR culture[]
Definition: asmname.c:67
static DWORD DWORD * dwLength
Definition: fusion.c:86
static DWORD cchBuffer
Definition: fusion.c:85
BOOL WINAPI DisableThreadLibraryCalls(IN HMODULE hLibModule)
Definition: loader.c:85
VOID WINAPI ExitProcess(IN UINT uExitCode)
Definition: proc.c:1487
void expect_no_runtimes(void)
Definition: metahost.c:289
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
HRESULT WINAPI CLRMetaHost_GetVersionFromFile(ICLRMetaHost *iface, LPCWSTR pwzFilePath, LPWSTR pwzBuffer, DWORD *pcchBuffer)
Definition: metahost.c:1049
void unload_all_runtimes(void)
Definition: metahost.c:266
HRESULT CLRMetaHost_CreateInstance(REFIID riid, void **ppobj)
Definition: metahost.c:1155
HRESULT ICLRRuntimeInfo_GetRuntimeHost(ICLRRuntimeInfo *iface, RuntimeHost **result)
Definition: metahost.c:544
HRESULT WINAPI CLRMetaHost_GetRuntime(ICLRMetaHost *iface, LPCWSTR pwzVersion, REFIID iid, LPVOID *ppRuntime)
Definition: metahost.c:1010
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
GLuint res
Definition: glext.h:9613
GLenum src
Definition: glext.h:6340
GLsizeiptr size
Definition: glext.h:5919
GLintptr offset
Definition: glext.h:5920
GLenum GLenum dst
Definition: glext.h:6340
GLuint GLsizei GLsizei * length
Definition: glext.h:6040
GLuint GLfloat * val
Definition: glext.h:7180
GLuint64EXT * result
Definition: glext.h:11304
GLenum GLsizei len
Definition: glext.h:6722
REFIID riid
Definition: atlbase.h:39
REFIID LPVOID * ppv
Definition: atlbase.h:39
#define S_OK
Definition: intsafe.h:52
#define SUCCEEDED(hr)
Definition: intsafe.h:50
const char * filename
Definition: ioapi.h:137
#define debugstr_guid
Definition: kernel32.h:35
#define debugstr_a
Definition: kernel32.h:31
#define debugstr_w
Definition: kernel32.h:32
static IN DWORD IN LPVOID lpvReserved
_In_ BOOL _In_ HANDLE hProcess
Definition: mapping.h:71
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
static PVOID ptr
Definition: dispmode.c:27
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
static REFIID LPVOID * ppInterface
Definition: metahost.c:34
@ RUNTIME_INFO_UPGRADE_VERSION
Definition: mscoree.idl:40
HRESULT(__stdcall * FLockClrVersionCallback)(void)
Definition: mscoree.idl:31
INT64 WINAPI ND_RI8(const void *ptr, INT offset)
Definition: mscoree_main.c:630
BOOL WINAPI StrongNameSignatureVerificationEx(LPCWSTR filename, BOOL forceVerification, BOOL *pVerified)
Definition: mscoree_main.c:509
HRESULT WINAPI _CorValidateImage(PVOID *imageBase, LPCWSTR imageName)
Definition: mscoree_main.c:236
static ULONG WINAPI mscorecf_AddRef(IClassFactory *iface)
Definition: mscoree_main.c:98
void WINAPI CoEEShutDownCOM(void)
Definition: mscoree_main.c:610
HRESULT WINAPI LoadStringRC(UINT resId, LPWSTR pBuffer, int iBufLen, int bQuiet)
Definition: mscoree_main.c:434
HRESULT WINAPI CorBindToCurrentRuntime(LPCWSTR filename, REFCLSID rclsid, REFIID riid, LPVOID *ppv)
Definition: mscoree_main.c:462
static mscorecf * impl_from_IClassFactory(IClassFactory *iface)
Definition: mscoree_main.c:77
HRESULT WINAPI DllRegisterServer(void)
Definition: mscoree_main.c:595
HRESULT WINAPI GetAssemblyMDImport(LPCWSTR szFileName, REFIID riid, IUnknown **ppIUnk)
Definition: mscoree_main.c:405
VOID WINAPI _CorImageUnloading(PVOID imageBase)
Definition: mscoree_main.c:231
HRESULT WINAPI GetRequestedRuntimeVersion(LPWSTR pExe, LPWSTR pVersion, DWORD cchBuffer, DWORD *dwlength)
Definition: mscoree_main.c:326
void WINAPI ND_WI8(void *ptr, INT offset, INT64 val)
Definition: mscoree_main.c:650
HRESULT WINAPI CLRCreateInstance(REFCLSID clsid, REFIID riid, LPVOID *ppInterface)
Definition: mscoree_main.c:560
void WINAPI CorExitProcess(int exitCode)
Definition: mscoree_main.c:224
char * WtoA(LPCWSTR wstr)
Definition: mscoree_main.c:30
INT WINAPI ND_RI4(const void *ptr, INT offset)
Definition: mscoree_main.c:625
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
Definition: mscoree_main.c:192
HRESULT WINAPI CreateConfigStream(LPCWSTR filename, IStream **stream)
Definition: mscoree_main.c:515
static HRESULT WINAPI mscorecf_QueryInterface(IClassFactory *iface, REFIID riid, LPVOID *ppobj)
Definition: mscoree_main.c:82
BOOL WINAPI StrongNameSignatureVerification(LPCWSTR filename, DWORD inFlags, DWORD *pOutFlags)
Definition: mscoree_main.c:503
HRESULT WINAPI CreateDebuggingInterfaceFromVersion(int nDebugVersion, LPCWSTR version, IUnknown **ppv)
Definition: mscoree_main.c:521
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: mscoree_main.c:288
void WINAPI ND_WU1(void *ptr, INT offset, BYTE val)
Definition: mscoree_main.c:635
static ULONG WINAPI mscorecf_Release(IClassFactory *iface)
Definition: mscoree_main.c:108
HRESULT WINAPI CorBindToRuntimeHost(LPCWSTR pwszVersion, LPCWSTR pwszBuildFlavor, LPCWSTR pwszHostConfigFile, VOID *pReserved, DWORD startupFlags, REFCLSID rclsid, REFIID riid, LPVOID *ppv)
Definition: mscoree_main.c:166
HRESULT WINAPI GetCORVersion(LPWSTR pbuffer, DWORD cchBuffer, DWORD *dwLength)
Definition: mscoree_main.c:265
HRESULT WINAPI DllUnregisterServer(void)
Definition: mscoree_main.c:600
HRESULT WINAPI LoadStringRCEx(LCID culture, UINT resId, LPWSTR pBuffer, int iBufLen, int bQuiet, int *pBufLen)
Definition: mscoree_main.c:417
HRESULT WINAPI GetCORSystemDirectory(LPWSTR pbuffer, DWORD cchBuffer, DWORD *dwLength)
Definition: mscoree_main.c:242
HRESULT WINAPI GetVersionFromProcess(HANDLE hProcess, LPWSTR pVersion, DWORD cchBuffer, DWORD *dwLength)
Definition: mscoree_main.c:411
__int32 WINAPI _CorExeMain2(PBYTE ptrMemory, DWORD cntMemory, LPWSTR imageName, LPWSTR loaderName, LPWSTR cmdLine)
Definition: mscoree_main.c:217
INT WINAPI ND_RU1(const void *ptr, INT offset)
Definition: mscoree_main.c:615
void WINAPI ND_CopyObjSrc(const void *src, INT offset, void *dst, INT size)
Definition: mscoree_main.c:660
HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
Definition: mscoree_main.c:572
HRESULT WINAPI CoInitializeCor(DWORD fFlags)
Definition: mscoree_main.c:399
static HINSTANCE MSCOREE_hInstance
Definition: mscoree_main.c:26
static HRESULT WINAPI mscorecf_LockServer(IClassFactory *iface, BOOL dolock)
Definition: mscoree_main.c:151
HRESULT WINAPI GetRealProcAddress(LPCSTR procname, void **ppv)
Definition: mscoree_main.c:336
static BOOL get_install_root(LPWSTR install_dir)
Definition: mscoree_main.c:45
HRESULT WINAPI GetFileVersion(LPCWSTR szFilename, LPWSTR szBuffer, DWORD cchBuffer, DWORD *dwLength)
Definition: mscoree_main.c:342
static HRESULT WINAPI mscorecf_CreateInstance(IClassFactory *iface, LPUNKNOWN pOuter, REFIID riid, LPVOID *ppobj)
Definition: mscoree_main.c:123
void WINAPI ND_WI4(void *ptr, INT offset, INT val)
Definition: mscoree_main.c:645
HRESULT WINAPI LockClrVersion(FLockClrVersionCallback hostCallback, FLockClrVersionCallback *pBeginHostSetup, FLockClrVersionCallback *pEndHostSetup)
Definition: mscoree_main.c:393
void WINAPI ND_CopyObjDst(const void *src, void *dst, INT offset, INT size)
Definition: mscoree_main.c:655
HRESULT(* fnCreateInstance)(REFIID riid, LPVOID *ppObj)
Definition: mscoree_main.c:28
HRESULT WINAPI CorBindToRuntimeEx(LPWSTR szVersion, LPWSTR szBuildFlavor, DWORD nflags, REFCLSID rslsid, REFIID riid, LPVOID *ppv)
Definition: mscoree_main.c:439
HRESULT WINAPI LoadLibraryShim(LPCWSTR szDllName, LPCWSTR szVersion, LPVOID pvReserved, HMODULE *phModDll)
Definition: mscoree_main.c:353
INT WINAPI ND_RI2(const void *ptr, INT offset)
Definition: mscoree_main.c:620
void WINAPI ND_WI2(void *ptr, INT offset, SHORT val)
Definition: mscoree_main.c:640
static const struct IClassFactoryVtbl mscorecf_vtbl
Definition: mscoree_main.c:157
STDAPI ClrCreateManagedInstance(LPCWSTR pTypeName, REFIID riid, void **ppObject)
Definition: mscoree_main.c:468
struct _MonoObject MonoObject
REFCLSID clsid
Definition: msctf.c:82
unsigned int UINT
Definition: ndis.h:50
static LPUNKNOWN
Definition: ndr_ole.c:49
#define KEY_READ
Definition: nt_native.h:1023
BYTE * PBYTE
Definition: pedump.c:66
short SHORT
Definition: pedump.c:59
long LONG
Definition: pedump.c:60
#define IsEqualGUID(rguid1, rguid2)
Definition: guiddef.h:147
#define REFIID
Definition: guiddef.h:118
#define REFCLSID
Definition: guiddef.h:117
PVOID pBuffer
#define strcmpW(s1, s2)
Definition: unicode.h:44
#define strcatW(d, s)
Definition: unicode.h:36
HRESULT __wine_unregister_resources(HMODULE module) DECLSPEC_HIDDEN
Definition: register.c:110
HRESULT __wine_register_resources(HMODULE module) DECLSPEC_HIDDEN
Definition: register.c:98
DWORD LCID
Definition: nls.h:13
#define CP_UTF8
Definition: nls.h:20
HRESULT hr
Definition: shlfolder.c:183
#define TRACE(s)
Definition: solgame.cpp:4
Definition: txthost.c:37
Definition: copy.c:22
IClassFactory IClassFactory_iface
Definition: mscoree_main.c:69
CLSID clsid
Definition: mscoree_main.c:74
fnCreateInstance pfnCreateInstance
Definition: mscoree_main.c:72
LONG ref
Definition: mscoree_main.c:70
Definition: send.c:48
Definition: parse.h:23
unsigned char * LPBYTE
Definition: typedefs.h:53
int32_t INT
Definition: typedefs.h:58
#define CONTAINING_RECORD(address, type, field)
Definition: typedefs.h:260
uint32_t ULONG
Definition: typedefs.h:59
int ret
#define HRESULT
Definition: msvc.h:7
#define WINAPI
Definition: msvc.h:6
#define S_FALSE
Definition: winerror.h:2357
#define E_NOINTERFACE
Definition: winerror.h:2364
#define E_HANDLE
Definition: winerror.h:2850
#define CLASS_E_NOAGGREGATION
Definition: winerror.h:2662
#define E_POINTER
Definition: winerror.h:2365
#define CLASS_E_CLASSNOTAVAILABLE
Definition: winerror.h:2663
#define HKEY_LOCAL_MACHINE
Definition: winreg.h:12
const char * LPCSTR
Definition: xmlstorage.h:183
__wchar_t WCHAR
Definition: xmlstorage.h:180
WCHAR * LPWSTR
Definition: xmlstorage.h:184
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
unsigned char BYTE
Definition: xxhash.c:193