From 8c634443d001d42e7fbf246108b37a51da736d3e Mon Sep 17 00:00:00 2001 From: Jacek Caban Date: Mon, 15 Nov 2010 12:36:01 +0100 Subject: [PATCH] urlmon: Don't forward Start call to protocol handler in BindProtocol. --- dlls/urlmon/bindprot.c | 33 ++++++++++++--------------------- 1 file changed, 12 insertions(+), 21 deletions(-) diff --git a/dlls/urlmon/bindprot.c b/dlls/urlmon/bindprot.c index 3b07809a017..956b6a53491 100644 --- a/dlls/urlmon/bindprot.c +++ b/dlls/urlmon/bindprot.c @@ -408,16 +408,21 @@ static HRESULT WINAPI BindProtocol_Start(IInternetProtocolEx *iface, LPCWSTR szU DWORD grfPI, HANDLE_PTR dwReserved) { BindProtocol *This = PROTOCOL_THIS(iface); + IUri *uri; + HRESULT hres; TRACE("(%p)->(%s %p %p %08x %lx)\n", This, debugstr_w(szUrl), pOIProtSink, pOIBindInfo, grfPI, dwReserved); - if(This->protocol_handler != (IInternetProtocol*)PROTOCOLHANDLER(This)) { - FIXME("This->protocol_handler != PROTOCOLHANDLER(This)\n"); - return E_FAIL; - } + hres = CreateUri(szUrl, Uri_CREATE_FILE_USE_DOS_PATH, 0, &uri); + if(FAILED(hres)) + return hres; - return IInternetProtocolEx_Start(PROTOCOLHANDLER(This), szUrl, pOIProtSink, pOIBindInfo, grfPI, dwReserved); + hres = IInternetProtocolEx_StartEx(PROTOCOLEX(This), uri, pOIProtSink, pOIBindInfo, + grfPI, (HANDLE*)dwReserved); + + IUri_Release(uri); + return hres; } static HRESULT WINAPI BindProtocol_Continue(IInternetProtocolEx *iface, PROTOCOLDATA *pProtocolData) @@ -591,22 +596,8 @@ static HRESULT WINAPI ProtocolHandler_Start(IInternetProtocolEx *iface, LPCWSTR IInternetProtocolSink *pOIProtSink, IInternetBindInfo *pOIBindInfo, DWORD grfPI, HANDLE_PTR dwReserved) { - BindProtocol *This = PROTOCOLHANDLER_THIS(iface); - IUri *uri; - HRESULT hres; - - TRACE("(%p)->(%s %p %p %08x %lx)\n", This, debugstr_w(szUrl), pOIProtSink, - pOIBindInfo, grfPI, dwReserved); - - hres = CreateUri(szUrl, Uri_CREATE_FILE_USE_DOS_PATH, 0, &uri); - if(FAILED(hres)) - return hres; - - hres = IInternetProtocolEx_StartEx(PROTOCOLHANDLER(This), uri, pOIProtSink, pOIBindInfo, - grfPI, (HANDLE*)dwReserved); - - IUri_Release(uri); - return hres; + ERR("Should not be called\n"); + return E_NOTIMPL; } static HRESULT WINAPI ProtocolHandler_Continue(IInternetProtocolEx *iface, PROTOCOLDATA *pProtocolData)