Commit 9ba69dce authored by Dmitry Timoshkov's avatar Dmitry Timoshkov Committed by Alexandre Julliard

combase: Use file system redirection path only for an opposite architecture in a WoW64 setup.

parent be94570d
......@@ -527,7 +527,7 @@ static HRESULT create_surrogate_server(REFCLSID rclsid, HANDLE *process)
HKEY key;
int arch = (sizeof(void *) > sizeof(int)) ? 64 : 32;
REGSAM opposite = (arch == 64) ? KEY_WOW64_32KEY : KEY_WOW64_64KEY;
BOOL is_wow64 = FALSE;
BOOL is_wow64 = FALSE, is_opposite = FALSE;
HRESULT hr;
WCHAR command[MAX_PATH + ARRAY_SIZE(processidW) + CHARS_IN_GUID];
DWORD size;
......@@ -548,6 +548,7 @@ static HRESULT create_surrogate_server(REFCLSID rclsid, HANDLE *process)
{
hr = open_appidkey_from_clsid(rclsid, opposite | KEY_READ, &key);
if (FAILED(hr)) return hr;
is_opposite = TRUE;
}
size = (MAX_PATH + 1) * sizeof(WCHAR);
......@@ -574,7 +575,7 @@ static HRESULT create_surrogate_server(REFCLSID rclsid, HANDLE *process)
TRACE("Activating surrogate local server %s\n", debugstr_w(command));
if (is_wow64 && arch == 64)
if (is_opposite)
{
void *cookie;
Wow64DisableWow64FsRedirection(&cookie);
......
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