Nikolay Sivov : ole32/tests: Fix test crash on recent Windows 10.
Alexandre Julliard
julliard at winehq.org
Wed Sep 9 15:42:28 CDT 2020
Module: wine
Branch: master
Commit: efe4d24feab64d5a550dbb294d9cf09fcf03dfa1
URL: https://source.winehq.org/git/wine.git/?a=commit;h=efe4d24feab64d5a550dbb294d9cf09fcf03dfa1
Author: Nikolay Sivov <nsivov at codeweavers.com>
Date: Wed Sep 9 12:44:31 2020 +0300
ole32/tests: Fix test crash on recent Windows 10.
Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
Signed-off-by: Huw Davies <huw at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/ole32/tests/marshal.c | 16 +++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)
diff --git a/dlls/ole32/tests/marshal.c b/dlls/ole32/tests/marshal.c
index a6811b9d24..891df59c54 100644
--- a/dlls/ole32/tests/marshal.c
+++ b/dlls/ole32/tests/marshal.c
@@ -3529,13 +3529,17 @@ static void test_client_security(void)
hr = IClassFactory_QueryInterface(pProxy, &IID_IUnknown, (LPVOID*)&pUnknown1);
ok_ole_success(hr, "IUnknown_QueryInterface IID_IUnknown");
- hr = IClassFactory_QueryInterface(pProxy, &IID_IRemUnknown, (LPVOID*)&pProxy2);
- ok_ole_success(hr, "IUnknown_QueryInterface IID_IStream");
+ /* Does not work on Windows 10 19xx+ */
+ if (SUCCEEDED(IClassFactory_QueryInterface(pProxy, &IID_IRemUnknown, (void **)&pProxy2)))
+ {
+ hr = IUnknown_QueryInterface(pProxy2, &IID_IUnknown, (void **)&pUnknown2);
+ ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
- hr = IUnknown_QueryInterface(pProxy2, &IID_IUnknown, (LPVOID*)&pUnknown2);
- ok_ole_success(hr, "IUnknown_QueryInterface IID_IUnknown");
+ ok(pUnknown1 == pUnknown2, "both proxy's IUnknowns should be the same - %p, %p\n", pUnknown1, pUnknown2);
+ IUnknown_Release(pUnknown2);
- ok(pUnknown1 == pUnknown2, "both proxy's IUnknowns should be the same - %p, %p\n", pUnknown1, pUnknown2);
+ IUnknown_Release(pProxy2);
+ }
hr = IClassFactory_QueryInterface(pProxy, &IID_IMarshal, (LPVOID*)&pMarshal);
ok_ole_success(hr, "IUnknown_QueryInterface IID_IMarshal");
@@ -3572,9 +3576,7 @@ static void test_client_security(void)
CoTaskMemFree(pServerPrincName);
IClassFactory_Release(pProxy);
- IUnknown_Release(pProxy2);
IUnknown_Release(pUnknown1);
- IUnknown_Release(pUnknown2);
IMarshal_Release(pMarshal);
IClientSecurity_Release(pCliSec);
More information about the wine-cvs
mailing list