[PATCH] combase: Don't start dllhost if the CLSID key doesn't exist.

Huw Davies huw at codeweavers.com
Wed Apr 6 09:22:29 CDT 2022


Signed-off-by: Huw Davies <huw at codeweavers.com>
---
 dlls/combase/rpc.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/dlls/combase/rpc.c b/dlls/combase/rpc.c
index f620339f19e..c8401fe0cbd 100644
--- a/dlls/combase/rpc.c
+++ b/dlls/combase/rpc.c
@@ -538,6 +538,12 @@ static HRESULT create_surrogate_server(REFCLSID rclsid, HANDLE *process)
 
     TRACE("Attempting to start surrogate server for %s\n", debugstr_guid(rclsid));
 
+    hr = open_key_for_clsid(rclsid, NULL, KEY_READ, &key);
+    if (FAILED(hr) && (arch == 64 || (IsWow64Process(GetCurrentProcess(), &is_wow64) && is_wow64)))
+        hr = open_key_for_clsid(rclsid, NULL, opposite | KEY_READ, &key);
+    if (FAILED(hr)) return hr;
+    RegCloseKey(key);
+
     hr = open_appidkey_from_clsid(rclsid, KEY_READ, &key);
     if (FAILED(hr) && (arch == 64 || (IsWow64Process(GetCurrentProcess(), &is_wow64) && is_wow64)))
     {
-- 
2.23.0




More information about the wine-devel mailing list