Module: wine
Branch: master
Commit: eb3ceac1ddc07feaf8f38427f93f82a4356f8760
URL: http://source.winehq.org/git/wine.git/?a=commit;h=eb3ceac1ddc07feaf8f38427f…
Author: Huw Davies <huw(a)codeweavers.com>
Date: Thu Nov 3 17:49:22 2016 +0000
rpcrt4/tests: Register the proxies to fix a crash on Windows 8 and 10.
Signed-off-by: Huw Davies <huw(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
---
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;
}