From: Dmitry Timoshkov Subject: [PATCH v2 1/2] combase: Use file system redirection path only for an opposite architecture in a WoW64 setup. Message-Id: <20220627124907.4c65f3075145f0d74e7430d6@baikal.ru> Date: Mon, 27 Jun 2022 12:49:07 +0300 Signed-off-by: Dmitry Timoshkov --- dlls/combase/rpc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dlls/combase/rpc.c b/dlls/combase/rpc.c index bed7518358c..3a171dbb324 100644 --- a/dlls/combase/rpc.c +++ b/dlls/combase/rpc.c @@ -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); -- 2.36.1