From c174a972b499efd7f8e88d57a3189ffab467c645 Mon Sep 17 00:00:00 2001 From: Christoph von Wittich Date: Mon, 5 Apr 2010 09:39:06 +0000 Subject: [PATCH] [mscoree] sync mscoree to wine 1.1.42 svn path=/trunk/; revision=46728 --- reactos/dll/win32/mscoree/mscoree.spec | 2 +- reactos/dll/win32/mscoree/mscoree_main.c | 33 +++++++++++++++++++++--- 2 files changed, 30 insertions(+), 5 deletions(-) diff --git a/reactos/dll/win32/mscoree/mscoree.spec b/reactos/dll/win32/mscoree/mscoree.spec index 9365f189b51..8e25cec2b7d 100644 --- a/reactos/dll/win32/mscoree/mscoree.spec +++ b/reactos/dll/win32/mscoree/mscoree.spec @@ -7,7 +7,7 @@ @ stub CallFunctionShim @ stub CloseCtrs -@ stub ClrCreateManagedInstance +@ stdcall ClrCreateManagedInstance(wstr ptr ptr) @ stub CoEEShutDownCOM @ stdcall CoInitializeCor(long) @ stub CoInitializeEE diff --git a/reactos/dll/win32/mscoree/mscoree_main.c b/reactos/dll/win32/mscoree/mscoree_main.c index dcdc91a5cc1..5b20c854c2e 100644 --- a/reactos/dll/win32/mscoree/mscoree_main.c +++ b/reactos/dll/win32/mscoree/mscoree_main.c @@ -91,9 +91,9 @@ HRESULT WINAPI CorBindToRuntimeHost(LPCWSTR pwszVersion, LPCWSTR pwszBuildFlavor { WCHAR *mono_exe; - FIXME("(%s, %s, %s, %p, %d, %p, %p, %p): semi-stub!\n", debugstr_w(pwszVersion), + FIXME("(%s, %s, %s, %p, %d, %s, %s, %p): semi-stub!\n", debugstr_w(pwszVersion), debugstr_w(pwszBuildFlavor), debugstr_w(pwszHostConfigFile), pReserved, - startupFlags, rclsid, riid, ppv); + startupFlags, debugstr_guid(rclsid), debugstr_guid(riid), ppv); if (!(mono_exe = get_mono_exe())) { @@ -144,6 +144,11 @@ __int32 WINAPI _CorExeMain(void) PROCESS_INFORMATION pi; WCHAR *mono_exe, *cmd_line; DWORD size, exit_code; + static const WCHAR WINE_MONO_TRACE[]={'W','I','N','E','_','M','O','N','O','_','T','R','A','C','E',0}; + static const WCHAR trace_switch_start[]={'"','-','-','t','r','a','c','e','=',0}; + static const WCHAR trace_switch_end[]={'"',' ',0}; + int trace_size; + WCHAR trace_setting[256]; if (!(mono_exe = get_mono_exe())) { @@ -151,7 +156,13 @@ __int32 WINAPI _CorExeMain(void) return -1; } + trace_size = GetEnvironmentVariableW(WINE_MONO_TRACE, trace_setting, sizeof(trace_setting)/sizeof(WCHAR)); + size = (lstrlenW(mono_exe) + lstrlenW(GetCommandLineW()) + 1) * sizeof(WCHAR); + + if (trace_size) + size += (trace_size + lstrlenW(trace_switch_start) + lstrlenW(trace_switch_end)) * sizeof(WCHAR); + if (!(cmd_line = HeapAlloc(GetProcessHeap(), 0, size))) { HeapFree(GetProcessHeap(), 0, mono_exe); @@ -160,6 +171,14 @@ __int32 WINAPI _CorExeMain(void) lstrcpyW(cmd_line, mono_exe); HeapFree(GetProcessHeap(), 0, mono_exe); + + if (trace_size) + { + lstrcatW(cmd_line, trace_switch_start); + lstrcatW(cmd_line, trace_setting); + lstrcatW(cmd_line, trace_switch_end); + } + lstrcatW(cmd_line, GetCommandLineW()); TRACE("new command line: %s\n", debugstr_w(cmd_line)); @@ -271,7 +290,7 @@ HRESULT WINAPI CoInitializeCor(DWORD fFlags) HRESULT WINAPI GetAssemblyMDImport(LPCWSTR szFileName, REFIID riid, IUnknown **ppIUnk) { - FIXME("(%p %s, %p, %p): stub\n", szFileName, debugstr_w(szFileName), riid, *ppIUnk); + FIXME("(%p %s, %s, %p): stub\n", szFileName, debugstr_w(szFileName), debugstr_guid(riid), *ppIUnk); return ERROR_CALL_NOT_IMPLEMENTED; } @@ -324,6 +343,12 @@ HRESULT WINAPI CorBindToCurrentRuntime(LPCWSTR filename, REFCLSID rclsid, REFIID return E_NOTIMPL; } +STDAPI ClrCreateManagedInstance(LPCWSTR pTypeName, REFIID riid, void **ppObject) +{ + FIXME("(%s,%s,%p)\n", debugstr_w(pTypeName), debugstr_guid(riid), ppObject); + return E_NOTIMPL; +} + BOOL WINAPI StrongNameSignatureVerification(LPCWSTR filename, DWORD inFlags, DWORD* pOutFlags) { FIXME("(%s, 0x%X, %p): stub\n", debugstr_w(filename), inFlags, pOutFlags); @@ -338,7 +363,7 @@ BOOL WINAPI StrongNameSignatureVerificationEx(LPCWSTR filename, BOOL forceVerifi HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID* ppv) { - FIXME("(%p, %p, %p): stub\n", rclsid, riid, ppv); + FIXME("(%s, %s, %p): stub\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv); if(!ppv) return E_INVALIDARG; -- 2.17.1