Module: wine Branch: master Commit: d5fa2ceacac454d3ba8b33caada1419aeda031f5 URL: http://source.winehq.org/git/wine.git/?a=commit;h=d5fa2ceacac454d3ba8b33caad...
Author: Vincent Povirk vincent@codeweavers.com Date: Fri Oct 1 16:05:36 2010 -0500
mscoree: Support searching for .NET runtimes by exe file.
---
dlls/mscoree/metahost.c | 15 ++++++++++++--- 1 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/dlls/mscoree/metahost.c b/dlls/mscoree/metahost.c index 5506946..17554a9 100644 --- a/dlls/mscoree/metahost.c +++ b/dlls/mscoree/metahost.c @@ -925,9 +925,9 @@ HRESULT get_runtime_info(LPCWSTR exefile, LPCWSTR version, LPCWSTR config_file, static const DWORD supported_startup_flags = 0; static const DWORD supported_runtime_flags = RUNTIME_INFO_UPGRADE_VERSION; int i; - - if (exefile) - FIXME("ignoring exe filename %s\n", debugstr_w(exefile)); + WCHAR local_version[MAX_PATH]; + ULONG local_version_size = MAX_PATH; + HRESULT hr;
if (config_file) FIXME("ignoring config filename %s\n", debugstr_w(config_file)); @@ -938,6 +938,15 @@ HRESULT get_runtime_info(LPCWSTR exefile, LPCWSTR version, LPCWSTR config_file, if (runtimeinfo_flags & ~supported_runtime_flags) FIXME("unsupported runtimeinfo flags %x\n", runtimeinfo_flags & ~supported_runtime_flags);
+ if (exefile && !version) + { + hr = CLRMetaHost_GetVersionFromFile(0, exefile, local_version, &local_version_size); + + version = local_version; + + if (FAILED(hr)) return hr; + } + if (version) { return CLRMetaHost_GetRuntime(0, version, &IID_ICLRRuntimeInfo, (void**)result);