[PATCH 2/2] rpcrt4/tests: Register the proxies to fix a crash on Windows 8 and 10.

Huw Davies huw at codeweavers.com
Thu Nov 3 12:49:22 CDT 2016


Signed-off-by: Huw Davies <huw at codeweavers.com>
---
 dlls/rpcrt4/tests/cstub.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/dlls/rpcrt4/tests/cstub.c b/dlls/rpcrt4/tests/cstub.c
index 7c71d60..606107f 100644
--- a/dlls/rpcrt4/tests/cstub.c
+++ b/dlls/rpcrt4/tests/cstub.c
@@ -627,6 +627,19 @@ static IPSFactoryBuffer *test_NdrDllGetClassObject(void)
     ok(r == S_OK, "ret %08x\n", r);
     ok(ppsf != NULL, "ppsf == NULL\n");
 
+    /* Because this PS factory is not loaded as a dll in the normal way, Windows 8 / 10
+       get confused and will crash when one of the proxies for the delegated ifaces is created.
+       Registering the ifaces fixes this (in fact calling CoRegisterPSClsid() with any IID / CLSID is enough). */
+
+    r = CoRegisterPSClsid(&IID_if1, &CLSID_psfact);
+    ok(r == S_OK, "ret %08x\n", r);
+    r = CoRegisterPSClsid(&IID_if2, &CLSID_psfact);
+    ok(r == S_OK, "ret %08x\n", r);
+    r = CoRegisterPSClsid(&IID_if3, &CLSID_psfact);
+    ok(r == S_OK, "ret %08x\n", r);
+    r = CoRegisterPSClsid(&IID_if4, &CLSID_psfact);
+    ok(r == S_OK, "ret %08x\n", r);
+
     return ppsf;
 }
 
-- 
2.7.4




More information about the wine-patches mailing list