Commit 040d41df authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

urlmon: Query for IWinInet[Http]Info on BindProtocol instead of protocol handler directly.

parent f8f7efd5
......@@ -798,17 +798,12 @@ static HRESULT WINAPI Binding_QueryInterface(IBinding *iface, REFIID riid, void
TRACE("(%p)->(IID_IWinInetInfo %p)\n", This, ppv);
/* NOTE: This violidates COM rules, but tests prove that we should do it */
if(!This->protocol->protocol_unk)
return E_NOINTERFACE;
if(This->protocol->protocol_unk) {
hres = IUnknown_QueryInterface(This->protocol->protocol_unk, &IID_IWinInetInfo,
(void**)&wininet_info);
hres = IInternetProtocolEx_QueryInterface(&This->protocol->IInternetProtocolEx_iface,
&IID_IWinInetInfo, (void**)&wininet_info);
if(SUCCEEDED(hres)) {
IWinInetInfo_Release(wininet_info);
*ppv = &This->IWinInetHttpInfo_iface;
}
}
}else if(IsEqualGUID(&IID_IWinInetHttpInfo, riid)) {
IWinInetHttpInfo *http_info;
HRESULT hres;
......@@ -816,15 +811,13 @@ static HRESULT WINAPI Binding_QueryInterface(IBinding *iface, REFIID riid, void
TRACE("(%p)->(IID_IWinInetHttpInfo %p)\n", This, ppv);
/* NOTE: This violidates COM rules, but tests prove that we should do it */
if(This->protocol->protocol_unk) {
hres = IUnknown_QueryInterface(This->protocol->protocol_unk, &IID_IWinInetHttpInfo,
(void**)&http_info);
hres = IInternetProtocolEx_QueryInterface(&This->protocol->IInternetProtocolEx_iface,
&IID_IWinInetHttpInfo, (void**)&http_info);
if(SUCCEEDED(hres)) {
IWinInetHttpInfo_Release(http_info);
*ppv = &This->IWinInetHttpInfo_iface;
}
}
}
if(*ppv) {
IBinding_AddRef(&This->IBinding_iface);
......@@ -1328,11 +1321,8 @@ static HRESULT WINAPI WinInetHttpInfo_QueryOption(IWinInetHttpInfo *iface, DWORD
TRACE("(%p)->(%x %p %p)\n", This, dwOption, pBuffer, pcbBuffer);
if(!This->protocol->protocol_unk)
return E_FAIL;
hres = IUnknown_QueryInterface(This->protocol->protocol_unk, &IID_IWinInetHttpInfo,
(void**)&wininet_info);
hres = IInternetProtocolEx_QueryInterface(&This->protocol->IInternetProtocolEx_iface,
&IID_IWinInetInfo, (void**)&wininet_info);
if(FAILED(hres))
return E_FAIL;
......@@ -1350,11 +1340,8 @@ static HRESULT WINAPI WinInetHttpInfo_QueryInfo(IWinInetHttpInfo *iface, DWORD d
TRACE("(%p)->(%x %p %p %p %p)\n", This, dwOption, pBuffer, pcbBuffer, pdwFlags, pdwReserved);
if(!This->protocol->protocol_unk)
return E_FAIL;
hres = IUnknown_QueryInterface(This->protocol->protocol_unk, &IID_IWinInetHttpInfo,
(void**)&http_info);
hres = IInternetProtocolEx_QueryInterface(&This->protocol->IInternetProtocolEx_iface,
&IID_IWinInetHttpInfo, (void**)&http_info);
if(FAILED(hres))
return E_FAIL;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment