mscoree: Implement CorBindToCurrentRuntime.
Vincent Povirk
madewokherd at gmail.com
Tue Sep 9 14:34:25 CDT 2014
-------------- next part --------------
From 6c362d8ffbe8013c1bd2202a4b8a42f944506287 Mon Sep 17 00:00:00 2001
From: Vincent Povirk <vincent at codeweavers.com>
Date: Tue, 9 Sep 2014 14:31:41 -0500
Subject: [PATCH] mscoree: Implement CorBindToCurrentRuntime.
---
dlls/mscoree/mscoree_main.c | 19 +++++++++++++++++--
1 file changed, 17 insertions(+), 2 deletions(-)
diff --git a/dlls/mscoree/mscoree_main.c b/dlls/mscoree/mscoree_main.c
index 9ac1e3e..7534108 100644
--- a/dlls/mscoree/mscoree_main.c
+++ b/dlls/mscoree/mscoree_main.c
@@ -485,8 +485,23 @@ HRESULT WINAPI CorBindToRuntimeEx(LPWSTR szVersion, LPWSTR szBuildFlavor, DWORD
HRESULT WINAPI CorBindToCurrentRuntime(LPCWSTR filename, REFCLSID rclsid, REFIID riid, LPVOID *ppv)
{
- FIXME("(%s, %s, %s, %p): stub\n", debugstr_w(filename), debugstr_guid(rclsid), debugstr_guid(riid), ppv);
- return E_NOTIMPL;
+ HRESULT ret;
+ ICLRRuntimeInfo *info;
+
+ TRACE("(%s, %s, %s, %p)\n", debugstr_w(filename), debugstr_guid(rclsid), debugstr_guid(riid), ppv);
+
+ *ppv = NULL;
+
+ ret = get_runtime_info(NULL, NULL, filename, 0, RUNTIME_INFO_UPGRADE_VERSION, TRUE, &info);
+
+ if (SUCCEEDED(ret))
+ {
+ ret = ICLRRuntimeInfo_GetInterface(info, rclsid, riid, ppv);
+
+ ICLRRuntimeInfo_Release(info);
+ }
+
+ return ret;
}
STDAPI ClrCreateManagedInstance(LPCWSTR pTypeName, REFIID riid, void **ppObject)
--
1.9.1
More information about the wine-patches
mailing list