Commit d5fa2cea authored by Vincent Povirk's avatar Vincent Povirk Committed by Alexandre Julliard

mscoree: Support searching for .NET runtimes by exe file.

parent 0985e029
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment