Module: wine Branch: master Commit: 4aa1af901635434e2f7692fd13d7c3e2e48af4fe URL: http://source.winehq.org/git/wine.git/?a=commit;h=4aa1af901635434e2f7692fd13...
Author: Vincent Povirk vincent@codeweavers.com Date: Tue Sep 9 14:31:41 2014 -0500
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)