From 7453c835e996e349a5db50533a587c86e911159e Mon Sep 17 00:00:00 2001 From: Huw Davies Date: Thu, 26 Jan 2017 11:07:59 +0000 Subject: [PATCH] urlmon/tests: Allow QueryInterface to accept IUnknown and IInternetProtocolSink. Fixes a crash on modern versions of Windows 10. Signed-off-by: Huw Davies Signed-off-by: Jacek Caban Signed-off-by: Alexandre Julliard --- 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 dad87edae80..5981c25c8d4 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; }