ReactOS 0.4.16-dev-122-g325d74c
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 case DLL_WINE_PREATTACH:
201 return FALSE; /* prefer native version */
205 break;
208 if (lpvReserved) break; /* process is terminating */
210 break;
211 }
212 return TRUE;
213}
214
215__int32 WINAPI _CorExeMain2(PBYTE ptrMemory, DWORD cntMemory, LPWSTR imageName, LPWSTR loaderName, LPWSTR cmdLine)
216{
217 TRACE("(%p, %u, %s, %s, %s)\n", ptrMemory, cntMemory, debugstr_w(imageName), debugstr_w(loaderName), debugstr_w(cmdLine));
218 FIXME("Directly running .NET applications not supported.\n");
219 return -1;
220}
221
222void WINAPI CorExitProcess(int exitCode)
223{
224 TRACE("(%x)\n", exitCode);
226 ExitProcess(exitCode);
227}
228
230{
231 TRACE("(%p): stub\n", imageBase);
232}
233
235{
236 TRACE("(%p, %s): stub\n", imageBase, debugstr_w(imageName));
237 return E_FAIL;
238}
239
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}
262
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}
285
286HRESULT WINAPI GetRequestedRuntimeInfo(LPCWSTR pExe, LPCWSTR pwszVersion, LPCWSTR pConfigurationFile,
287 DWORD startupFlags, DWORD runtimeInfoFlags, LPWSTR pDirectory, DWORD dwDirectory, DWORD *dwDirectoryLength,
288 LPWSTR pVersion, DWORD cchBuffer, DWORD *dwlength)
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}
323
325{
326 TRACE("(%s, %p, %d, %p)\n", debugstr_w(pExe), pVersion, cchBuffer, dwlength);
327
328 if(!dwlength)
329 return E_POINTER;
330
331 return GetRequestedRuntimeInfo(pExe, NULL, NULL, 0, 0, NULL, 0, NULL, pVersion, cchBuffer, dwlength);
332}
333
335{
336 FIXME("(%s, %p)\n", debugstr_a(procname), ppv);
338}
339
341{
342 TRACE("(%s, %p, %d, %p)\n", debugstr_w(szFilename), szBuffer, cchBuffer, dwLength);
343
344 if (!szFilename || !dwLength)
345 return E_POINTER;
346
348 return CLRMetaHost_GetVersionFromFile(0, szFilename, szBuffer, dwLength);
349}
350
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}
390
392{
393 FIXME("(%p %p %p): stub\n", hostCallback, pBeginHostSetup, pEndHostSetup);
394 return S_OK;
395}
396
398{
399 FIXME("(0x%08x): stub\n", fFlags);
400 return S_OK;
401}
402
404{
405 FIXME("(%p %s, %s, %p): stub\n", szFileName, debugstr_w(szFileName), debugstr_guid(riid), *ppIUnk);
407}
408
410{
411 FIXME("(%p, %p, %d, %p): stub\n", hProcess, pVersion, cchBuffer, dwLength);
412 return E_NOTIMPL;
413}
414
415HRESULT WINAPI LoadStringRCEx(LCID culture, UINT resId, LPWSTR pBuffer, int iBufLen, int bQuiet, int* pBufLen)
416{
417 HRESULT res = S_OK;
418 if ((iBufLen <= 0) || !pBuffer)
419 return E_INVALIDARG;
420 pBuffer[0] = 0;
421 if (resId) {
422 FIXME("(%d, %x, %p, %d, %d, %p): semi-stub\n", culture, resId, pBuffer, iBufLen, bQuiet, pBufLen);
423 res = E_NOTIMPL;
424 }
425 else
426 res = E_FAIL;
427 if (pBufLen)
428 *pBufLen = lstrlenW(pBuffer);
429 return res;
430}
431
432HRESULT WINAPI LoadStringRC(UINT resId, LPWSTR pBuffer, int iBufLen, int bQuiet)
433{
434 return LoadStringRCEx(-1, resId, pBuffer, iBufLen, bQuiet, NULL);
435}
436
439{
440 HRESULT ret;
442
443 TRACE("%s %s %d %s %s %p\n", debugstr_w(szVersion), debugstr_w(szBuildFlavor), nflags, debugstr_guid( rslsid ),
445
446 *ppv = NULL;
447
449
450 if (SUCCEEDED(ret))
451 {
452 ret = ICLRRuntimeInfo_GetInterface(info, rslsid, riid, ppv);
453
454 ICLRRuntimeInfo_Release(info);
455 }
456
457 return ret;
458}
459
461{
462 FIXME("(%s, %s, %s, %p): stub\n", debugstr_w(filename), debugstr_guid(rclsid), debugstr_guid(riid), ppv);
463 return E_NOTIMPL;
464}
465
467{
468 HRESULT ret;
472 IUnknown *unk;
473
474 TRACE("(%s,%s,%p)\n", debugstr_w(pTypeName), debugstr_guid(riid), ppObject);
475
476 /* FIXME: How to determine which runtime version to use? */
478
479 if (SUCCEEDED(ret))
480 {
482
483 ICLRRuntimeInfo_Release(info);
484 }
485
486 if (SUCCEEDED(ret))
488
489 if (SUCCEEDED(ret))
491
492 if (SUCCEEDED(ret))
493 {
494 ret = IUnknown_QueryInterface(unk, riid, ppObject);
495 IUnknown_Release(unk);
496 }
497
498 return ret;
499}
500
502{
503 FIXME("(%s, 0x%X, %p): stub\n", debugstr_w(filename), inFlags, pOutFlags);
504 return FALSE;
505}
506
508{
509 FIXME("(%s, %u, %p): stub\n", debugstr_w(filename), forceVerification, pVerified);
510 return FALSE;
511}
512
514{
515 FIXME("(%s, %p): stub\n", debugstr_w(filename), stream);
516 return E_NOTIMPL;
517}
518
520{
521 const WCHAR v2_0[] = {'v','2','.','0','.','5','0','7','2','7',0};
522 HRESULT hr = E_FAIL;
523 ICLRRuntimeInfo *runtimeinfo;
524
525 if(nDebugVersion < 1 || nDebugVersion > 4)
526 return E_INVALIDARG;
527
528 TRACE("(%d %s, %p): stub\n", nDebugVersion, debugstr_w(version), ppv);
529
530 if(!ppv)
531 return E_INVALIDARG;
532
533 *ppv = NULL;
534
535 if(strcmpW(version, v2_0) != 0)
536 {
537 FIXME("Currently .NET Version '%s' not support.\n", debugstr_w(version));
538 return E_INVALIDARG;
539 }
540
541 if(nDebugVersion != 3)
542 return E_INVALIDARG;
543
544 hr = CLRMetaHost_GetRuntime(0, version, &IID_ICLRRuntimeInfo, (void**)&runtimeinfo);
545 if(hr == S_OK)
546 {
547 hr = ICLRRuntimeInfo_GetInterface(runtimeinfo, &CLSID_CLRDebuggingLegacy, &IID_ICorDebug, (void**)ppv);
548
549 ICLRRuntimeInfo_Release(runtimeinfo);
550 }
551
552 if(!*ppv)
553 return E_FAIL;
554
555 return hr;
556}
557
559{
561
562 if (IsEqualGUID(clsid, &CLSID_CLRMetaHost))
564
565 FIXME("not implemented for class %s\n", debugstr_guid(clsid));
566
568}
569
571{
572 mscorecf *This;
573 HRESULT hr;
574
575 TRACE("(%s, %s, %p): stub\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv);
576
577 if(!ppv)
578 return E_INVALIDARG;
579
580 This = HeapAlloc(GetProcessHeap(), 0, sizeof(mscorecf));
581
582 This->IClassFactory_iface.lpVtbl = &mscorecf_vtbl;
583 This->pfnCreateInstance = &create_monodata;
584 This->ref = 1;
585 This->clsid = *rclsid;
586
587 hr = IClassFactory_QueryInterface( &This->IClassFactory_iface, riid, ppv );
588 IClassFactory_Release(&This->IClassFactory_iface);
589
590 return hr;
591}
592
594{
596}
597
599{
601}
602
604{
605 return S_FALSE;
606}
607
609{
610 FIXME("stub.\n");
611}
612
613INT WINAPI ND_RU1( const void *ptr, INT offset )
614{
615 return *((const BYTE *)ptr + offset);
616}
617
618INT WINAPI ND_RI2( const void *ptr, INT offset )
619{
620 return *(const SHORT *)((const BYTE *)ptr + offset);
621}
622
623INT WINAPI ND_RI4( const void *ptr, INT offset )
624{
625 return *(const INT *)((const BYTE *)ptr + offset);
626}
627
629{
630 return *(const INT64 *)((const BYTE *)ptr + offset);
631}
632
634{
635 *((BYTE *)ptr + offset) = val;
636}
637
639{
640 *(SHORT *)((BYTE *)ptr + offset) = val;
641}
642
644{
645 *(INT *)((BYTE *)ptr + offset) = val;
646}
647
649{
650 *(INT64 *)((BYTE *)ptr + offset) = val;
651}
652
653void WINAPI ND_CopyObjDst( const void *src, void *dst, INT offset, INT size )
654{
655 memcpy( (BYTE *)dst + offset, src, size );
656}
657
658void WINAPI ND_CopyObjSrc( const void *src, INT offset, void *dst, INT size )
659{
660 memcpy( dst, (const BYTE *)src + offset, size );
661}
signed long long INT64
#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:160
#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
GLsizeiptr size
Definition: glext.h:5919
GLuint res
Definition: glext.h:9613
GLenum src
Definition: glext.h:6340
GLenum GLenum dst
Definition: glext.h:6340
GLuint GLsizei GLsizei * length
Definition: glext.h:6040
GLuint GLfloat * val
Definition: glext.h:7180
GLenum GLsizei len
Definition: glext.h:6722
GLuint64EXT * result
Definition: glext.h:11304
GLintptr offset
Definition: glext.h:5920
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:628
BOOL WINAPI StrongNameSignatureVerificationEx(LPCWSTR filename, BOOL forceVerification, BOOL *pVerified)
Definition: mscoree_main.c:507
HRESULT WINAPI _CorValidateImage(PVOID *imageBase, LPCWSTR imageName)
Definition: mscoree_main.c:234
static ULONG WINAPI mscorecf_AddRef(IClassFactory *iface)
Definition: mscoree_main.c:98
void WINAPI CoEEShutDownCOM(void)
Definition: mscoree_main.c:608
HRESULT WINAPI LoadStringRC(UINT resId, LPWSTR pBuffer, int iBufLen, int bQuiet)
Definition: mscoree_main.c:432
HRESULT WINAPI CorBindToCurrentRuntime(LPCWSTR filename, REFCLSID rclsid, REFIID riid, LPVOID *ppv)
Definition: mscoree_main.c:460
static mscorecf * impl_from_IClassFactory(IClassFactory *iface)
Definition: mscoree_main.c:77
HRESULT WINAPI DllRegisterServer(void)
Definition: mscoree_main.c:593
HRESULT WINAPI GetAssemblyMDImport(LPCWSTR szFileName, REFIID riid, IUnknown **ppIUnk)
Definition: mscoree_main.c:403
VOID WINAPI _CorImageUnloading(PVOID imageBase)
Definition: mscoree_main.c:229
HRESULT WINAPI GetRequestedRuntimeVersion(LPWSTR pExe, LPWSTR pVersion, DWORD cchBuffer, DWORD *dwlength)
Definition: mscoree_main.c:324
void WINAPI ND_WI8(void *ptr, INT offset, INT64 val)
Definition: mscoree_main.c:648
HRESULT WINAPI CLRCreateInstance(REFCLSID clsid, REFIID riid, LPVOID *ppInterface)
Definition: mscoree_main.c:558
void WINAPI CorExitProcess(int exitCode)
Definition: mscoree_main.c:222
char * WtoA(LPCWSTR wstr)
Definition: mscoree_main.c:30
INT WINAPI ND_RI4(const void *ptr, INT offset)
Definition: mscoree_main.c:623
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:513
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:501
HRESULT WINAPI CreateDebuggingInterfaceFromVersion(int nDebugVersion, LPCWSTR version, IUnknown **ppv)
Definition: mscoree_main.c:519
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:286
void WINAPI ND_WU1(void *ptr, INT offset, BYTE val)
Definition: mscoree_main.c:633
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:263
HRESULT WINAPI DllUnregisterServer(void)
Definition: mscoree_main.c:598
HRESULT WINAPI LoadStringRCEx(LCID culture, UINT resId, LPWSTR pBuffer, int iBufLen, int bQuiet, int *pBufLen)
Definition: mscoree_main.c:415
HRESULT WINAPI GetCORSystemDirectory(LPWSTR pbuffer, DWORD cchBuffer, DWORD *dwLength)
Definition: mscoree_main.c:240
HRESULT WINAPI GetVersionFromProcess(HANDLE hProcess, LPWSTR pVersion, DWORD cchBuffer, DWORD *dwLength)
Definition: mscoree_main.c:409
__int32 WINAPI _CorExeMain2(PBYTE ptrMemory, DWORD cntMemory, LPWSTR imageName, LPWSTR loaderName, LPWSTR cmdLine)
Definition: mscoree_main.c:215
INT WINAPI ND_RU1(const void *ptr, INT offset)
Definition: mscoree_main.c:613
void WINAPI ND_CopyObjSrc(const void *src, INT offset, void *dst, INT size)
Definition: mscoree_main.c:658
HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
Definition: mscoree_main.c:570
HRESULT WINAPI CoInitializeCor(DWORD fFlags)
Definition: mscoree_main.c:397
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:334
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:340
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:643
HRESULT WINAPI LockClrVersion(FLockClrVersionCallback hostCallback, FLockClrVersionCallback *pBeginHostSetup, FLockClrVersionCallback *pEndHostSetup)
Definition: mscoree_main.c:391
void WINAPI ND_CopyObjDst(const void *src, void *dst, INT offset, INT size)
Definition: mscoree_main.c:653
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:437
HRESULT WINAPI LoadLibraryShim(LPCWSTR szDllName, LPCWSTR szVersion, LPVOID pvReserved, HMODULE *phModDll)
Definition: mscoree_main.c:351
INT WINAPI ND_RI2(const void *ptr, INT offset)
Definition: mscoree_main.c:618
void WINAPI ND_WI2(void *ptr, INT offset, SHORT val)
Definition: mscoree_main.c:638
static const struct IClassFactoryVtbl mscorecf_vtbl
Definition: mscoree_main.c:157
STDAPI ClrCreateManagedInstance(LPCWSTR pTypeName, REFIID riid, void **ppObject)
Definition: mscoree_main.c:466
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: 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
char * host
Definition: whois.c:55
#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