Huw Davies : urlmon/tests: Allow QueryInterface to accept IUnknown and IInternetProtocolSink.

Alexandre Julliard julliard at winehq.org
Thu Jan 26 14:53:15 CST 2017


Module: wine
Branch: master
Commit: 7453c835e996e349a5db50533a587c86e911159e
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=7453c835e996e349a5db50533a587c86e911159e

Author: Huw Davies <huw at codeweavers.com>
Date:   Thu Jan 26 11:07:59 2017 +0000

urlmon/tests: Allow QueryInterface to accept IUnknown and IInternetProtocolSink.

Fixes a crash on modern versions of Windows 10.

Signed-off-by: Huw Davies <huw at codeweavers.com>
Signed-off-by: Jacek Caban <jacek at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/urlmon/tests/protocol.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/dlls/urlmon/tests/protocol.c b/dlls/urlmon/tests/protocol.c
index dad87ed..5981c25 100644
--- a/dlls/urlmon/tests/protocol.c
+++ b/dlls/urlmon/tests/protocol.c
@@ -1110,6 +1110,12 @@ static IInternetProtocolSink protocol_sink = { &protocol_sink_vtbl };
 
 static HRESULT WINAPI MimeProtocolSink_QueryInterface(IInternetProtocolSink *iface, REFIID riid, void **ppv)
 {
+    if(IsEqualGUID(&IID_IUnknown, riid)
+            || IsEqualGUID(&IID_IInternetProtocolSink, riid)) {
+        *ppv = iface;
+        return S_OK;
+    }
+
     ok(0, "unexpected call\n");
     return E_NOTIMPL;
 }




More information about the wine-cvs mailing list