From 107a59d4e868b1f5581ab532971b6cec205bd262 Mon Sep 17 00:00:00 2001 From: Vincent Povirk Date: Fri, 1 Oct 2010 15:43:31 -0500 Subject: [PATCH 04/18] mscoree: Use the .NET 4 interfaces to implement CorBindToRuntimeHost. --- dlls/mscoree/mscoree_main.c | 18 +++++++++++++----- 1 files changed, 13 insertions(+), 5 deletions(-) diff --git a/dlls/mscoree/mscoree_main.c b/dlls/mscoree/mscoree_main.c index e528360..d1f4324 100644 --- a/dlls/mscoree/mscoree_main.c +++ b/dlls/mscoree/mscoree_main.c @@ -319,17 +319,25 @@ HRESULT WINAPI CorBindToRuntimeHost(LPCWSTR pwszVersion, LPCWSTR pwszBuildFlavor DWORD startupFlags, REFCLSID rclsid, REFIID riid, LPVOID *ppv) { - FIXME("(%s, %s, %s, %p, %d, %s, %s, %p): semi-stub!\n", debugstr_w(pwszVersion), + HRESULT ret; + ICLRRuntimeInfo *info; + + TRACE("(%s, %s, %s, %p, %d, %s, %s, %p)\n", debugstr_w(pwszVersion), debugstr_w(pwszBuildFlavor), debugstr_w(pwszHostConfigFile), pReserved, startupFlags, debugstr_guid(rclsid), debugstr_guid(riid), ppv); - if (!get_mono_path(NULL)) + *ppv = NULL; + + ret = get_runtime_info(NULL, pwszVersion, pwszHostConfigFile, startupFlags, 0, TRUE, &info); + + if (SUCCEEDED(ret)) { - MESSAGE("wine: Install the Windows version of Mono to run .NET executables\n"); - return E_FAIL; + ret = ICLRRuntimeInfo_GetInterface(info, rclsid, riid, ppv); + + ICLRRuntimeInfo_Release(info); } - return S_OK; + return ret; } BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) -- 1.7.1