ReactOS 0.4.16-dev-2354-g16de117
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 <stdarg.h>
23
24#define COBJMACROS
25#include "windef.h"
26#include "winbase.h"
27#include "winuser.h"
28#include "winnls.h"
29#include "winreg.h"
30#include "ole2.h"
31#include "ocidl.h"
32#include "shellapi.h"
33#include "strongname.h"
34
35#include "initguid.h"
36#include "msxml2.h"
37#include "corerror.h"
38#include "cor.h"
39#include "mscoree.h"
40#include "corhdr.h"
41#include "cordebug.h"
42#include "metahost.h"
43#include "fusion.h"
44#include "wine/list.h"
45#include "mscoree_private.h"
46#include "rpcproxy.h"
47
48#include "wine/debug.h"
49
52
54{
55 int length;
56 char buffer[1018];
57};
58
60
62
63char *WtoA(LPCWSTR wstr)
64{
65 int length;
66 char *result;
67
68 length = WideCharToMultiByte(CP_UTF8, 0, wstr, -1, NULL, 0, NULL, NULL);
69
71
72 if (result)
74
75 return result;
76}
77
78static BOOL get_install_root(LPWSTR install_dir)
79{
80 static 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};
81 static const WCHAR install_root[] = {'I','n','s','t','a','l','l','R','o','o','t',0};
82
83 DWORD len;
84 HKEY key;
85
86 if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, dotnet_key, 0, KEY_READ, &key))
87 return FALSE;
88
89 len = MAX_PATH * sizeof(WCHAR);
90 if (RegQueryValueExW(key, install_root, 0, NULL, (LPBYTE)install_dir, &len))
91 {
93 return FALSE;
94 }
96
97 return TRUE;
98}
99
100typedef struct mscorecf
101{
104
106
109
111{
112 return CONTAINING_RECORD(iface, mscorecf, IClassFactory_iface);
113}
114
116{
117 TRACE("%s %p\n", debugstr_guid(riid), ppobj);
118
121 {
122 IClassFactory_AddRef( iface );
123 *ppobj = iface;
124 return S_OK;
125 }
126
127 ERR("interface %s not implemented\n", debugstr_guid(riid));
128 return E_NOINTERFACE;
129}
130
132{
135
136 TRACE("%p ref=%lu\n", This, ref);
137
138 return ref;
139}
140
142{
145
146 TRACE("%p ref=%lu\n", This, ref);
147
148 if (ref == 0)
149 {
150 free(This);
151 }
152
153 return ref;
154}
155
157 REFIID riid, LPVOID *ppobj )
158{
160 HRESULT hr;
161 IUnknown *punk;
162
163 TRACE("%p %s %p\n", pOuter, debugstr_guid(riid), ppobj );
164
165 *ppobj = NULL;
166
167 if (pOuter)
169
170 hr = This->pfnCreateInstance( &This->clsid, (LPVOID*) &punk );
171 if (SUCCEEDED(hr))
172 {
173 hr = IUnknown_QueryInterface( punk, riid, ppobj );
174
175 IUnknown_Release( punk );
176 }
177 else
178 {
179 WARN("Cannot create an instance object. 0x%08lx\n", hr);
180 }
181 return hr;
182}
183
185{
186 FIXME("(%p)->(%d),stub!\n",iface,dolock);
187 return S_OK;
188}
189
190static const struct IClassFactoryVtbl mscorecf_vtbl =
191{
197};
198
199HRESULT WINAPI CorBindToRuntimeHost(LPCWSTR pwszVersion, LPCWSTR pwszBuildFlavor,
200 LPCWSTR pwszHostConfigFile, VOID *pReserved,
201 DWORD startupFlags, REFCLSID rclsid,
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}
224
225void CDECL mono_print_handler_fn(const char *string, INT is_stdout)
226{
228
229 if (!tls)
230 {
231 tls = malloc(sizeof(*tls));
232 tls->length = 0;
234 }
235
236 while (*string)
237 {
238 int remaining_buffer = sizeof(tls->buffer) - tls->length;
239 int length = strlen(string);
240 const char *newline = memchr(string, '\n', min(length, remaining_buffer));
241
242 if (newline)
243 {
244 length = newline - string + 1;
245 wine_dbg_printf("%.*s%.*s", tls->length, tls->buffer, length, string);
246 tls->length = 0;
247 string += length;
248 }
249 else if (length > remaining_buffer)
250 {
251 /* this would overflow Wine's debug buffer */
252 wine_dbg_printf("%.*s%.*s\n", tls->length, tls->buffer, remaining_buffer, string);
253 tls->length = 0;
254 string += remaining_buffer;
255 }
256 else
257 {
258 memcpy(tls->buffer + tls->length, string, length);
259 tls->length += length;
260 break;
261 }
262 }
263}
264
265void CDECL mono_log_handler_fn(const char *log_domain, const char *log_level, const char *message, INT fatal, void *user_data)
266{
267 SIZE_T len = (log_domain ? strlen(log_domain) + 2 : 0) + strlen(message) + strlen("\n") + 1;
268 char *msg = calloc(len, sizeof(char));
269
270 if (msg)
271 {
272 sprintf(msg, "%s%s%s\n", log_domain ? log_domain : "", log_domain ? ": " : "", message);
274 }
275
276 free(msg);
277}
278
280{
281 TRACE("(%p, %ld, %p)\n", hinstDLL, fdwReason, lpvReserved);
282
283 switch (fdwReason)
284 {
287
289
291 return FALSE;
292
293 break;
297 break;
300 if (lpvReserved) break; /* process is terminating */
303 {
306 }
307 break;
308 }
309 return TRUE;
310}
311
312__int32 WINAPI _CorExeMain2(PBYTE ptrMemory, DWORD cntMemory, LPWSTR imageName, LPWSTR loaderName, LPWSTR cmdLine)
313{
314 TRACE("(%p, %lu, %s, %s, %s)\n", ptrMemory, cntMemory, debugstr_w(imageName), debugstr_w(loaderName), debugstr_w(cmdLine));
315 FIXME("Directly running .NET applications not supported.\n");
316 return -1;
317}
318
319void WINAPI CorExitProcess(int exitCode)
320{
321 TRACE("(%x)\n", exitCode);
322 CLRMetaHost_ExitProcess(0, exitCode);
323}
324
326{
327 TRACE("(%p): stub\n", imageBase);
328}
329
331{
332 TRACE("(%p, %s): stub\n", imageBase, debugstr_w(imageName));
333 return E_FAIL;
334}
335
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}
358
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}
381
383{
384 ERR_(winediag)("If this function is called, it is likely the result of a broken .NET installation\n");
385
386 if (!unk1 || !unk2)
387 return E_POINTER;
388
389 return S_OK;
390}
391
393{
394 ERR_(winediag)("If this function is called, it is likely the result of a broken .NET installation\n");
395
396 return E_NOTIMPL;
397}
398
399HRESULT WINAPI GetRequestedRuntimeInfo(LPCWSTR pExe, LPCWSTR pwszVersion, LPCWSTR pConfigurationFile,
400 DWORD startupFlags, DWORD runtimeInfoFlags, LPWSTR pDirectory, DWORD dwDirectory, DWORD *dwDirectoryLength,
401 LPWSTR pVersion, DWORD cchBuffer, DWORD *dwlength)
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}
436
438{
439 TRACE("(%s, %p, %ld, %p)\n", debugstr_w(pExe), pVersion, cchBuffer, dwlength);
440
441 if(!dwlength)
442 return E_POINTER;
443
444 return GetRequestedRuntimeInfo(pExe, NULL, NULL, 0, 0, NULL, 0, NULL, pVersion, cchBuffer, dwlength);
445}
446
448{
449 FIXME("(%s, %p)\n", debugstr_a(procname), ppv);
451}
452
454{
455 TRACE("(%s, %p, %ld, %p)\n", debugstr_w(szFilename), szBuffer, cchBuffer, dwLength);
456
457 if (!szFilename || !dwLength)
458 return E_POINTER;
459
461 return CLRMetaHost_GetVersionFromFile(0, szFilename, szBuffer, dwLength);
462}
463
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}
503
505{
506 FIXME("(%p %p %p): stub\n", hostCallback, pBeginHostSetup, pEndHostSetup);
507 return S_OK;
508}
509
511{
512 FIXME("(0x%08lx): stub\n", fFlags);
513 return S_OK;
514}
515
517{
518 FIXME("(%p %s, %s, %p): stub\n", szFileName, debugstr_w(szFileName), debugstr_guid(riid), *ppIUnk);
520}
521
523{
524 FIXME("(%p, %p, %ld, %p): stub\n", hProcess, pVersion, cchBuffer, dwLength);
525 return E_NOTIMPL;
526}
527
528HRESULT WINAPI LoadStringRCEx(LCID culture, UINT resId, LPWSTR pBuffer, int iBufLen, int bQuiet, int* pBufLen)
529{
530 HRESULT res = S_OK;
531 if ((iBufLen <= 0) || !pBuffer)
532 return E_INVALIDARG;
533 pBuffer[0] = 0;
534 if (resId) {
535 FIXME("(%ld, %x, %p, %d, %d, %p): semi-stub\n", culture, resId, pBuffer, iBufLen, bQuiet, pBufLen);
536 res = E_NOTIMPL;
537 }
538 else
539 res = E_FAIL;
540 if (pBufLen)
541 *pBufLen = lstrlenW(pBuffer);
542 return res;
543}
544
545HRESULT WINAPI LoadStringRC(UINT resId, LPWSTR pBuffer, int iBufLen, int bQuiet)
546{
547 return LoadStringRCEx(-1, resId, pBuffer, iBufLen, bQuiet, NULL);
548}
549
552{
553 HRESULT ret;
554 ICLRRuntimeInfo *info;
555
556 TRACE("%s %s %ld %s %s %p\n", debugstr_w(szVersion), debugstr_w(szBuildFlavor), nflags, debugstr_guid( rslsid ),
558
559 *ppv = NULL;
560
562
563 if (SUCCEEDED(ret))
564 {
565 ret = ICLRRuntimeInfo_GetInterface(info, rslsid, riid, ppv);
566
567 ICLRRuntimeInfo_Release(info);
568 }
569
570 return ret;
571}
572
574{
575 HRESULT ret;
576 ICLRRuntimeInfo *info;
577
578 TRACE("(%s, %s, %s, %p)\n", debugstr_w(filename), debugstr_guid(rclsid), debugstr_guid(riid), ppv);
579
580 *ppv = NULL;
581
583
584 if (SUCCEEDED(ret))
585 {
586 ret = ICLRRuntimeInfo_GetInterface(info, rclsid, riid, ppv);
587
588 ICLRRuntimeInfo_Release(info);
589 }
590
591 return ret;
592}
593
595{
596 HRESULT ret;
597 ICLRRuntimeInfo *info;
600 IUnknown *unk;
601
602 TRACE("(%s,%s,%p)\n", debugstr_w(pTypeName), debugstr_guid(riid), ppObject);
603
604 /* FIXME: How to determine which runtime version to use? */
606
607 if (SUCCEEDED(ret))
608 {
610
611 ICLRRuntimeInfo_Release(info);
612 }
613
614 if (SUCCEEDED(ret))
616
617 if (SUCCEEDED(ret))
619
620 if (SUCCEEDED(ret))
621 {
622 ret = IUnknown_QueryInterface(unk, riid, ppObject);
623 IUnknown_Release(unk);
624 }
625
626 return ret;
627}
628
630{
631 FIXME("(%s, 0x%lX, %p): stub\n", debugstr_w(filename), inFlags, pOutFlags);
632 return FALSE;
633}
634
636{
637 FIXME("(%s, %u, %p): stub\n", debugstr_w(filename), forceVerification, pVerified);
638 *pVerified = TRUE;
639 return TRUE;
640}
641
643{
644 FIXME("(%s, %p, %p): stub\n", debugstr_w(path), token, size);
645 return FALSE;
646}
647
649{
650 static const WCHAR v2_0[] = {'v','2','.','0','.','5','0','7','2','7',0};
651 HRESULT hr = E_FAIL;
652 ICLRRuntimeInfo *runtimeinfo;
653
654 if(nDebugVersion < 1 || nDebugVersion > 4)
655 return E_INVALIDARG;
656
657 TRACE("(%d %s, %p): stub\n", nDebugVersion, debugstr_w(version), ppv);
658
659 if(!ppv)
660 return E_INVALIDARG;
661
662 *ppv = NULL;
663
664 if(wcscmp(version, v2_0) != 0)
665 {
666 FIXME("Currently .NET Version '%s' not support.\n", debugstr_w(version));
667 return E_INVALIDARG;
668 }
669
670 if(nDebugVersion != 3)
671 return E_INVALIDARG;
672
673 hr = CLRMetaHost_GetRuntime(0, version, &IID_ICLRRuntimeInfo, (void**)&runtimeinfo);
674 if(hr == S_OK)
675 {
676 hr = ICLRRuntimeInfo_GetInterface(runtimeinfo, &CLSID_CLRDebuggingLegacy, &IID_ICorDebug, (void**)ppv);
677
678 ICLRRuntimeInfo_Release(runtimeinfo);
679 }
680
681 if(!*ppv)
682 return E_FAIL;
683
684 return hr;
685}
686
688{
690
691 if (IsEqualGUID(clsid, &CLSID_CLRMetaHost))
693 if (IsEqualGUID(clsid, &CLSID_CLRMetaHostPolicy))
695
696 FIXME("not implemented for class %s\n", debugstr_guid(clsid));
697
699}
700
702{
704
706}
707
709{
710 mscorecf *This;
711 HRESULT hr;
712
713 TRACE("(%s, %s, %p): stub\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv);
714
715 if(!ppv)
716 return E_INVALIDARG;
717
718 This = malloc(sizeof(mscorecf));
719
720 This->IClassFactory_iface.lpVtbl = &mscorecf_vtbl;
721 This->pfnCreateInstance = create_monodata;
722 This->ref = 1;
723 This->clsid = *rclsid;
724
725 hr = IClassFactory_QueryInterface( &This->IClassFactory_iface, riid, ppv );
726 IClassFactory_Release(&This->IClassFactory_iface);
727
728 return hr;
729}
730
731static void parse_msi_version_string(const char *version, int *parts)
732{
733 const char *minor_start, *build_start;
734
735 parts[0] = atoi(version);
736
737 parts[1] = parts[2] = 0;
738
739 minor_start = strchr(version, '.');
740 if (minor_start)
741 {
742 minor_start++;
743 parts[1] = atoi(minor_start);
744
745 build_start = strchr(minor_start, '.');
746 if (build_start)
747 parts[2] = atoi(build_start+1);
748 }
749}
750
751static int compare_versions(const char *a, const char *b)
752{
753 int a_parts[3], b_parts[3], i;
754
755 parse_msi_version_string(a, a_parts);
756 parse_msi_version_string(b, b_parts);
757
758 for (i=0; i<3; i++)
759 if (a_parts[i] != b_parts[i])
760 return a_parts[i] - b_parts[i];
761
762 return 0;
763}
764
765static BOOL invoke_appwiz(void)
766{
769 WCHAR app[MAX_PATH];
770 WCHAR *args;
771 LONG len;
772 BOOL ret;
773
774 static const WCHAR controlW[] = {'\\','c','o','n','t','r','o','l','.','e','x','e',0};
775 static const WCHAR argsW[] =
776 {' ','a','p','p','w','i','z','.','c','p','l',' ','i','n','s','t','a','l','l','_','m','o','n','o',0};
777
778 len = GetSystemDirectoryW(app, MAX_PATH - ARRAY_SIZE(controlW));
779 memcpy(app+len, controlW, sizeof(controlW));
780
781 args = malloc(len * sizeof(WCHAR) + sizeof(controlW) + sizeof(argsW));
782 if(!args)
783 return FALSE;
784
785 memcpy(args, app, len*sizeof(WCHAR) + sizeof(controlW));
786 memcpy(args + len + ARRAY_SIZE(controlW) - 1, argsW, sizeof(argsW));
787
788 TRACE("starting %s\n", debugstr_w(args));
789
790 memset(&si, 0, sizeof(si));
791 si.cb = sizeof(si);
792 ret = CreateProcessW(app, args, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi);
793 free(args);
794 if (ret) {
798 }
799
800 return ret;
801}
802
803static BOOL get_support_msi(LPCWSTR mono_path, LPWSTR msi_path)
804{
805 static const WCHAR support_msi_relative[] = {'\\','s','u','p','p','o','r','t','\\','w','i','n','e','m','o','n','o','-','s','u','p','p','o','r','t','.','m','s','i',0};
806 UINT (WINAPI *pMsiOpenPackageW)(LPCWSTR,ULONG*);
807 UINT (WINAPI *pMsiGetProductPropertyA)(ULONG,LPCSTR,LPSTR,LPDWORD);
808 UINT (WINAPI *pMsiCloseHandle)(ULONG);
809 HMODULE hmsi = NULL;
810 char versionstringbuf[15];
811 UINT res;
813 ULONG msiproduct;
814 BOOL ret=FALSE;
815
816 hmsi = GetModuleHandleA("msi");
817
818 lstrcpyW(msi_path, mono_path);
819 lstrcatW(msi_path, support_msi_relative);
820
821 pMsiOpenPackageW = (void*)GetProcAddress(hmsi, "MsiOpenPackageW");
822
823 res = pMsiOpenPackageW(msi_path, &msiproduct);
824
825 if (res == ERROR_SUCCESS)
826 {
827 buffer_size = sizeof(versionstringbuf);
828
829 pMsiGetProductPropertyA = (void*)GetProcAddress(hmsi, "MsiGetProductPropertyA");
830
831 res = pMsiGetProductPropertyA(msiproduct, "ProductVersion", versionstringbuf, &buffer_size);
832
833 pMsiCloseHandle = (void*)GetProcAddress(hmsi, "MsiCloseHandle");
834
835 pMsiCloseHandle(msiproduct);
836 }
837
838 if (res == ERROR_SUCCESS) {
839 TRACE("found support msi version %s at %s\n", versionstringbuf, debugstr_w(msi_path));
840
841 if (compare_versions(WINE_MONO_VERSION, versionstringbuf) <= 0)
842 {
843 ret = TRUE;
844 }
845 }
846
847 return ret;
848}
849
851{
853 HMODULE hmsi = NULL;
854 HRESULT initresult = E_FAIL;
855 UINT (WINAPI *pMsiEnumRelatedProductsA)(LPCSTR,DWORD,DWORD,LPSTR);
856 UINT (WINAPI *pMsiGetProductInfoA)(LPCSTR,LPCSTR,LPSTR,DWORD*);
857 UINT (WINAPI *pMsiInstallProductW)(LPCWSTR,LPCWSTR);
858 char versionstringbuf[15];
859 char productcodebuf[39];
860 UINT res;
862 BOOL ret;
863 WCHAR mono_path[MAX_PATH];
864 WCHAR support_msi_path[MAX_PATH];
865
866 static const char* mono_upgrade_code = "{DE624609-C6B5-486A-9274-EF0B854F6BC5}";
867
869
870 if (is_wow64)
871 {
872 TRACE("not installing mono in wow64 process\n");
873 return TRUE;
874 }
875
876 TRACE("searching for mono runtime\n");
877
878 if (!get_mono_path(mono_path, FALSE))
879 {
880 TRACE("mono runtime not found\n");
881 return invoke_appwiz();
882 }
883
884 TRACE("mono runtime is at %s\n", debugstr_w(mono_path));
885
886 hmsi = LoadLibraryA("msi");
887
888 if (!hmsi)
889 {
890 ERR("couldn't load msi.dll\n");
891 return FALSE;
892 }
893
894 pMsiEnumRelatedProductsA = (void*)GetProcAddress(hmsi, "MsiEnumRelatedProductsA");
895
896 res = pMsiEnumRelatedProductsA(mono_upgrade_code, 0, 0, productcodebuf);
897
898 if (res == ERROR_SUCCESS)
899 {
900 pMsiGetProductInfoA = (void*)GetProcAddress(hmsi, "MsiGetProductInfoA");
901
902 buffer_size = sizeof(versionstringbuf);
903
904 res = pMsiGetProductInfoA(productcodebuf, "VersionString", versionstringbuf, &buffer_size);
905 }
906 else if (res != ERROR_NO_MORE_ITEMS)
907 {
908 ERR("MsiEnumRelatedProducts failed, err=%u\n", res);
909 }
910
911 if (res == ERROR_SUCCESS)
912 {
913 TRACE("found installed support package %s\n", versionstringbuf);
914
915 if (compare_versions(WINE_MONO_VERSION, versionstringbuf) <= 0)
916 {
917 TRACE("support package is at least %s, quitting\n", WINE_MONO_VERSION);
918 ret = TRUE;
919 goto end;
920 }
921 }
922
923 initresult = CoInitialize(NULL);
924
925 ret = get_support_msi(mono_path, support_msi_path);
926 if (!ret)
927 {
928 /* Try looking outside c:\windows\mono */
929 ret = (get_mono_path(mono_path, TRUE) &&
930 get_support_msi(mono_path, support_msi_path));
931 }
932
933 if (ret)
934 {
935 TRACE("installing support msi\n");
936
937 pMsiInstallProductW = (void*)GetProcAddress(hmsi, "MsiInstallProductW");
938
939 res = pMsiInstallProductW(support_msi_path, NULL);
940
941 if (res == ERROR_SUCCESS)
942 {
943 ret = TRUE;
944 goto end;
945 }
946 else
947 ERR("MsiInstallProduct failed, err=%i\n", res);
948 }
949
950 ret = invoke_appwiz();
951
952end:
953 if (hmsi)
954 FreeLibrary(hmsi);
955 if (SUCCEEDED(initresult))
957 return ret;
958}
959
961{
963
965}
966
968{
970}
971
973{
974 FIXME("stub.\n");
975}
976
977INT WINAPI ND_RU1( const void *ptr, INT offset )
978{
979 return *((const BYTE *)ptr + offset);
980}
981
982INT WINAPI ND_RI2( const void *ptr, INT offset )
983{
984 return *(const SHORT *)((const BYTE *)ptr + offset);
985}
986
987INT WINAPI ND_RI4( const void *ptr, INT offset )
988{
989 return *(const INT *)((const BYTE *)ptr + offset);
990}
991
993{
994 return *(const INT64 *)((const BYTE *)ptr + offset);
995}
996
998{
999 *((BYTE *)ptr + offset) = val;
1000}
1001
1003{
1004 *(SHORT *)((BYTE *)ptr + offset) = val;
1005}
1006
1008{
1009 *(INT *)((BYTE *)ptr + offset) = val;
1010}
1011
1013{
1014 *(INT64 *)((BYTE *)ptr + offset) = val;
1015}
1016
1017void WINAPI ND_CopyObjDst( const void *src, void *dst, INT offset, INT size )
1018{
1019 memcpy( (BYTE *)dst + offset, src, size );
1020}
1021
1022void WINAPI ND_CopyObjSrc( const void *src, INT offset, void *dst, INT size )
1023{
1024 memcpy( dst, (const BYTE *)src + offset, size );
1025}
std::map< E_STRING, PART_TEST > parts
Definition: LocaleTests.cpp:67
unsigned char BOOLEAN
Definition: actypes.h:127
COMPILER_DEPENDENT_INT64 INT64
Definition: actypes.h:132
static DWORD const fdwReason
#define InterlockedIncrement
Definition: armddk.h:53
#define InterlockedDecrement
Definition: armddk.h:52
#define msg(x)
Definition: auth_time.c:54
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
Definition: precomp.h:23
#define ARRAY_SIZE(A)
Definition: main.h:20
HRESULT __wine_unregister_resources(HMODULE module)
Definition: register.c:124
HRESULT __wine_register_resources(HMODULE module)
Definition: register.c:112
#define FIXME(fmt,...)
Definition: precomp.h:53
#define WARN(fmt,...)
Definition: precomp.h:61
#define ERR(fmt,...)
Definition: precomp.h:57
#define STDAPI
Definition: basetyps.h:41
const GUID IID_IUnknown
const GUID IID_IClassFactory
#define RegCloseKey(hKey)
Definition: registry.h:49
#define CLR_E_SHIM_RUNTIMEEXPORT
Definition: corerror.h:228
void runtimehost_uninit(void)
HRESULT create_monodata(REFCLSID clsid, LPVOID *ppObj)
void runtimehost_init(void)
HRESULT RuntimeHost_CreateManagedInstance(RuntimeHost *This, LPCWSTR name, MonoDomain *domain, MonoObject **result)
HRESULT RuntimeHost_GetIUnknownForObject(RuntimeHost *This, MonoObject *obj, IUnknown **ppUnk)
#define E_INVALIDARG
Definition: ddrawi.h:101
#define E_NOTIMPL
Definition: ddrawi.h:99
#define E_FAIL
Definition: ddrawi.h:102
#define free
Definition: debug_ros.c:5
#define malloc
Definition: debug_ros.c:4
static IUnknown **const WCHAR v2_0[]
Definition: debugging.c:37
#define ERROR_SUCCESS
Definition: deptool.c:10
static LPVOID LPUNKNOWN
Definition: dinput.c:53
#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
void WINAPI DECLSPEC_HOTPATCH CoUninitialize(void)
Definition: combase.c:2842
static const WCHAR szDllName[]
Definition: sip.c:61
#define CDECL
Definition: compat.h:29
#define CloseHandle
Definition: compat.h:739
#define ERROR_CALL_NOT_IMPLEMENTED
Definition: compat.h:102
#define DLL_THREAD_DETACH
Definition: compat.h:133
#define DLL_PROCESS_ATTACH
Definition: compat.h:131
#define DLL_PROCESS_DETACH
Definition: compat.h:130
#define GetProcAddress(x, y)
Definition: compat.h:753
#define FreeLibrary(x)
Definition: compat.h:748
#define GetCurrentProcess()
Definition: compat.h:759
#define ERROR_NO_MORE_ITEMS
Definition: compat.h:105
#define IsWow64Process
Definition: compat.h:760
#define MAX_PATH
Definition: compat.h:34
#define WINE_DECLARE_DEBUG_CHANNEL(x)
Definition: compat.h:45
#define lstrcpyW
Definition: compat.h:749
#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
HMODULE WINAPI DECLSPEC_HOTPATCH GetModuleHandleA(LPCSTR lpModuleName)
Definition: loader.c:812
HINSTANCE WINAPI DECLSPEC_HOTPATCH LoadLibraryA(LPCSTR lpLibFileName)
Definition: loader.c:111
UINT WINAPI GetSystemDirectoryW(OUT LPWSTR lpBuffer, IN UINT uSize)
Definition: path.c:2232
BOOL WINAPI DECLSPEC_HOTPATCH CreateProcessW(LPCWSTR lpApplicationName, LPWSTR lpCommandLine, LPSECURITY_ATTRIBUTES lpProcessAttributes, LPSECURITY_ATTRIBUTES lpThreadAttributes, BOOL bInheritHandles, DWORD dwCreationFlags, LPVOID lpEnvironment, LPCWSTR lpCurrentDirectory, LPSTARTUPINFOW lpStartupInfo, LPPROCESS_INFORMATION lpProcessInformation)
Definition: proc.c:4442
LPVOID WINAPI TlsGetValue(IN DWORD Index)
Definition: thread.c:1240
BOOL WINAPI TlsSetValue(IN DWORD Index, IN LPVOID Value)
Definition: thread.c:1276
BOOL WINAPI TlsFree(IN DWORD Index)
Definition: thread.c:1166
DWORD WINAPI DECLSPEC_HOTPATCH TlsAlloc(void)
Definition: thread.c:657
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
void expect_no_runtimes(void)
Definition: metahost.c:454
HRESULT WINAPI CLRMetaHost_GetVersionFromFile(ICLRMetaHost *iface, LPCWSTR pwzFilePath, LPWSTR pwzBuffer, DWORD *pcchBuffer)
Definition: metahost.c:1157
HRESULT CLRMetaHostPolicy_CreateInstance(REFIID riid, void **ppobj)
Definition: metahost.c:1385
HRESULT CLRMetaHost_CreateInstance(REFIID riid, void **ppobj)
Definition: metahost.c:1281
BOOL get_mono_path(LPWSTR path, BOOL skip_local)
Definition: metahost.c:874
static void * user_data
Definition: metahost.c:106
HRESULT ICLRRuntimeInfo_GetRuntimeHost(ICLRRuntimeInfo *iface, RuntimeHost **result)
Definition: metahost.c:703
HRESULT WINAPI CLRMetaHost_ExitProcess(ICLRMetaHost *iface, INT32 iExitCode)
Definition: metahost.c:1244
HRESULT WINAPI CLRMetaHost_GetRuntime(ICLRMetaHost *iface, LPCWSTR pwzVersion, REFIID iid, LPVOID *ppRuntime)
Definition: metahost.c:1149
#define __int32
Definition: corecrt.h:66
_ACRTIMP int __cdecl wcscmp(const wchar_t *, const wchar_t *)
Definition: wcs.c:1972
_ACRTIMP int __cdecl atoi(const char *)
Definition: string.c:1715
_ACRTIMP char *__cdecl strchr(const char *, int)
Definition: string.c:3286
_ACRTIMP size_t __cdecl strlen(const char *)
Definition: string.c:1592
HRESULT WINAPI CoInitialize(LPVOID lpReserved)
Definition: compobj.c:531
return ret
Definition: mutex.c:146
#define INFINITE
Definition: serial.h:102
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
GLuint GLuint end
Definition: gl.h:1545
GLuint res
Definition: glext.h:9613
GLenum src
Definition: glext.h:6340
GLuint buffer
Definition: glext.h:5915
GLsizeiptr size
Definition: glext.h:5919
GLintptr offset
Definition: glext.h:5920
GLboolean GLboolean GLboolean b
Definition: glext.h:6204
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
GLboolean GLboolean GLboolean GLboolean a
Definition: glext.h:6204
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat token
Definition: glfuncs.h:210
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
BOOL is_wow64
Definition: main.c:38
UNICODE_STRING imageName
Definition: library.c:551
static IN DWORD IN LPVOID lpvReserved
LPWSTR WINAPI lstrcatW(LPWSTR lpString1, LPCWSTR lpString2)
Definition: lstring.c:274
_In_ BOOL _In_ HANDLE hProcess
Definition: mapping.h:71
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
#define memchr(s, c, n)
Definition: mkisofs.h:875
static PVOID ptr
Definition: dispmode.c:27
#define sprintf
Definition: sprintf.c:45
static LPCWSTR LPVOID pvReserved
Definition: asmcache.c:749
static LPCWSTR szVersion
Definition: asmcache.c:748
static LPCWSTR LPVOID HMODULE * phModDll
Definition: asmcache.c:749
static PROCESS_INFORMATION pi
Definition: debugger.c:2303
static SYSTEM_INFO si
Definition: virtual.c:39
static REFIID LPVOID * ppInterface
Definition: metahost.c:40
static DWORD unk1
Definition: cursoricon.c:1638
#define min(a, b)
Definition: monoChain.cc:55
@ RUNTIME_INFO_UPGRADE_VERSION
Definition: mscoree.idl:40
HRESULT(__stdcall * FLockClrVersionCallback)(void)
Definition: mscoree.idl:31
static BOOL get_support_msi(LPCWSTR mono_path, LPWSTR msi_path)
Definition: mscoree_main.c:803
INT64 WINAPI ND_RI8(const void *ptr, INT offset)
Definition: mscoree_main.c:992
HRESULT WINAPI _CorValidateImage(PVOID *imageBase, LPCWSTR imageName)
Definition: mscoree_main.c:330
static ULONG WINAPI mscorecf_AddRef(IClassFactory *iface)
Definition: mscoree_main.c:131
void WINAPI CoEEShutDownCOM(void)
Definition: mscoree_main.c:972
HRESULT WINAPI LoadStringRC(UINT resId, LPWSTR pBuffer, int iBufLen, int bQuiet)
Definition: mscoree_main.c:545
HRESULT WINAPI CorBindToCurrentRuntime(LPCWSTR filename, REFCLSID rclsid, REFIID riid, LPVOID *ppv)
Definition: mscoree_main.c:573
static mscorecf * impl_from_IClassFactory(IClassFactory *iface)
Definition: mscoree_main.c:110
HRESULT WINAPI DllRegisterServer(void)
Definition: mscoree_main.c:960
HRESULT WINAPI GetAssemblyMDImport(LPCWSTR szFileName, REFIID riid, IUnknown **ppIUnk)
Definition: mscoree_main.c:516
static void parse_msi_version_string(const char *version, int *parts)
Definition: mscoree_main.c:731
VOID WINAPI _CorImageUnloading(PVOID imageBase)
Definition: mscoree_main.c:325
HRESULT WINAPI GetRequestedRuntimeVersion(LPWSTR pExe, LPWSTR pVersion, DWORD cchBuffer, DWORD *dwlength)
Definition: mscoree_main.c:437
void WINAPI ND_WI8(void *ptr, INT offset, INT64 val)
static DWORD print_tls_index
Definition: mscoree_main.c:59
void CDECL mono_log_handler_fn(const char *log_domain, const char *log_level, const char *message, INT fatal, void *user_data)
Definition: mscoree_main.c:265
HRESULT WINAPI CLRCreateInstance(REFCLSID clsid, REFIID riid, LPVOID *ppInterface)
Definition: mscoree_main.c:687
void WINAPI CorExitProcess(int exitCode)
Definition: mscoree_main.c:319
char * WtoA(LPCWSTR wstr)
Definition: mscoree_main.c:63
INT WINAPI ND_RI4(const void *ptr, INT offset)
Definition: mscoree_main.c:987
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
Definition: mscoree_main.c:279
static HRESULT WINAPI mscorecf_QueryInterface(IClassFactory *iface, REFIID riid, LPVOID *ppobj)
Definition: mscoree_main.c:115
HRESULT WINAPI CreateDebuggingInterfaceFromVersion(int nDebugVersion, LPCWSTR version, IUnknown **ppv)
Definition: mscoree_main.c:648
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:399
static int compare_versions(const char *a, const char *b)
Definition: mscoree_main.c:751
void WINAPI ND_WU1(void *ptr, INT offset, BYTE val)
Definition: mscoree_main.c:997
static BOOL invoke_appwiz(void)
Definition: mscoree_main.c:765
static ULONG WINAPI mscorecf_Release(IClassFactory *iface)
Definition: mscoree_main.c:141
HRESULT WINAPI CorBindToRuntimeHost(LPCWSTR pwszVersion, LPCWSTR pwszBuildFlavor, LPCWSTR pwszHostConfigFile, VOID *pReserved, DWORD startupFlags, REFCLSID rclsid, REFIID riid, LPVOID *ppv)
Definition: mscoree_main.c:199
HRESULT WINAPI CorGetSvc(void *unk)
Definition: mscoree_main.c:392
HRESULT WINAPI CreateInterface(REFCLSID clsid, REFIID riid, LPVOID *ppInterface)
Definition: mscoree_main.c:701
HRESULT WINAPI GetCORVersion(LPWSTR pbuffer, DWORD cchBuffer, DWORD *dwLength)
Definition: mscoree_main.c:359
HRESULT WINAPI DllUnregisterServer(void)
Definition: mscoree_main.c:967
HRESULT WINAPI LoadStringRCEx(LCID culture, UINT resId, LPWSTR pBuffer, int iBufLen, int bQuiet, int *pBufLen)
Definition: mscoree_main.c:528
HRESULT WINAPI CorIsLatestSvc(int *unk1, int *unk2)
Definition: mscoree_main.c:382
HRESULT WINAPI GetCORSystemDirectory(LPWSTR pbuffer, DWORD cchBuffer, DWORD *dwLength)
Definition: mscoree_main.c:336
void CDECL mono_print_handler_fn(const char *string, INT is_stdout)
Definition: mscoree_main.c:225
HRESULT WINAPI GetVersionFromProcess(HANDLE hProcess, LPWSTR pVersion, DWORD cchBuffer, DWORD *dwLength)
Definition: mscoree_main.c:522
__int32 WINAPI _CorExeMain2(PBYTE ptrMemory, DWORD cntMemory, LPWSTR imageName, LPWSTR loaderName, LPWSTR cmdLine)
Definition: mscoree_main.c:312
INT WINAPI ND_RU1(const void *ptr, INT offset)
Definition: mscoree_main.c:977
void WINAPI ND_CopyObjSrc(const void *src, INT offset, void *dst, INT size)
HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
Definition: mscoree_main.c:708
HRESULT WINAPI CoInitializeCor(DWORD fFlags)
Definition: mscoree_main.c:510
static BOOL install_wine_mono(void)
Definition: mscoree_main.c:850
BOOLEAN WINAPI StrongNameSignatureVerification(LPCWSTR filename, DWORD inFlags, DWORD *pOutFlags)
Definition: mscoree_main.c:629
static HRESULT WINAPI mscorecf_LockServer(IClassFactory *iface, BOOL dolock)
Definition: mscoree_main.c:184
HRESULT WINAPI GetRealProcAddress(LPCSTR procname, void **ppv)
Definition: mscoree_main.c:447
static BOOL get_install_root(LPWSTR install_dir)
Definition: mscoree_main.c:78
HRESULT WINAPI GetFileVersion(LPCWSTR szFilename, LPWSTR szBuffer, DWORD cchBuffer, DWORD *dwLength)
Definition: mscoree_main.c:453
static HRESULT WINAPI mscorecf_CreateInstance(IClassFactory *iface, LPUNKNOWN pOuter, REFIID riid, LPVOID *ppobj)
Definition: mscoree_main.c:156
BOOLEAN WINAPI StrongNameSignatureVerificationEx(LPCWSTR filename, BOOLEAN forceVerification, BOOLEAN *pVerified)
Definition: mscoree_main.c:635
void WINAPI ND_WI4(void *ptr, INT offset, INT val)
HRESULT WINAPI LockClrVersion(FLockClrVersionCallback hostCallback, FLockClrVersionCallback *pBeginHostSetup, FLockClrVersionCallback *pEndHostSetup)
Definition: mscoree_main.c:504
void WINAPI ND_CopyObjDst(const void *src, void *dst, INT offset, INT size)
HRESULT(* fnCreateInstance)(REFIID riid, LPVOID *ppObj)
Definition: mscoree_main.c:61
BOOLEAN WINAPI StrongNameTokenFromAssembly(LPCWSTR path, BYTE **token, ULONG *size)
Definition: mscoree_main.c:642
HRESULT WINAPI CorBindToRuntimeEx(LPWSTR szVersion, LPWSTR szBuildFlavor, DWORD nflags, REFCLSID rslsid, REFIID riid, LPVOID *ppv)
Definition: mscoree_main.c:550
HRESULT WINAPI LoadLibraryShim(LPCWSTR szDllName, LPCWSTR szVersion, LPVOID pvReserved, HMODULE *phModDll)
Definition: mscoree_main.c:464
INT WINAPI ND_RI2(const void *ptr, INT offset)
Definition: mscoree_main.c:982
void WINAPI ND_WI2(void *ptr, INT offset, SHORT val)
static const struct IClassFactoryVtbl mscorecf_vtbl
Definition: mscoree_main.c:190
STDAPI ClrCreateManagedInstance(LPCWSTR pTypeName, REFIID riid, void **ppObject)
Definition: mscoree_main.c:594
struct _MonoObject MonoObject
#define WINE_MONO_VERSION
const CLSID * clsid
Definition: msctf.cpp:50
unsigned int UINT
Definition: ndis.h:50
_Out_ PVOID pReserved
Definition: netsh.h:77
#define KEY_READ
Definition: nt_native.h:1026
#define LPDWORD
Definition: nt_native.h:46
#define DWORD
Definition: nt_native.h:44
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
_In_opt_ IUnknown * punk
Definition: shlwapi.h:158
PVOID pBuffer
#define calloc
Definition: rosglue.h:14
DWORD LCID
Definition: nls.h:13
#define CP_UTF8
Definition: nls.h:20
#define ERR_(ch,...)
Definition: debug.h:156
const char int wine_dbg_printf(const char *format,...) __WINE_PRINTF_ATTR(1
#define memset(x, y, z)
Definition: compat.h:39
#define args
Definition: format.c:66
HRESULT hr
Definition: shlfolder.c:183
static DWORD tls
Definition: sock.c:229
#define TRACE(s)
Definition: solgame.cpp:4
wchar_t const *const size_t const buffer_size
Definition: stat.cpp:95
Definition: match.c:390
Definition: txthost.c:37
Definition: copy.c:22
Definition: tftpd.h:60
IClassFactory IClassFactory_iface
Definition: mscoree_main.c:102
CLSID clsid
Definition: mscoree_main.c:107
fnCreateInstance pfnCreateInstance
Definition: mscoree_main.c:105
Definition: send.c:48
DWORD WINAPI WaitForSingleObject(IN HANDLE hHandle, IN DWORD dwMilliseconds)
Definition: synch.c:82
unsigned char * LPBYTE
Definition: typedefs.h:53
ULONG_PTR SIZE_T
Definition: typedefs.h:80
int32_t INT
Definition: typedefs.h:58
#define CONTAINING_RECORD(address, type, field)
Definition: typedefs.h:260
uint32_t ULONG
Definition: typedefs.h:59
#define TLS_OUT_OF_INDEXES
Definition: winbase.h:529
#define HRESULT
Definition: msvc.h:7
#define WINAPI
Definition: msvc.h:6
#define E_NOINTERFACE
Definition: winerror.h:3479
#define E_HANDLE
Definition: winerror.h:4117
#define CLASS_E_NOAGGREGATION
Definition: winerror.h:3771
#define E_POINTER
Definition: winerror.h:3480
#define CLASS_E_CLASSNOTAVAILABLE
Definition: winerror.h:3772
void fatal(const char *msg)
#define HKEY_LOCAL_MACHINE
Definition: winreg.h:12
const char * LPCSTR
Definition: xmlstorage.h:183
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
__wchar_t WCHAR
Definition: xmlstorage.h:180
WCHAR * LPWSTR
Definition: xmlstorage.h:184
char * LPSTR
Definition: xmlstorage.h:182
unsigned char BYTE
Definition: xxhash.c:193