urlmon: If ProtocolCF_CreateInstance doesn't support aggregation retry without it.
This patch fixes a regression caused by 097811f251
.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47190
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
97529298a1
commit
43c1992821
|
@ -509,15 +509,19 @@ static HRESULT WINAPI BindProtocol_StartEx(IInternetProtocolEx *iface, IUri *pUr
|
|||
|
||||
hres = IClassFactory_CreateInstance(cf, (IUnknown*)&This->IInternetBindInfo_iface,
|
||||
&IID_IUnknown, (void**)&protocol_unk);
|
||||
if(SUCCEEDED(hres)) {
|
||||
hres = IUnknown_QueryInterface(protocol_unk, &IID_IInternetProtocol, (void**)&protocol);
|
||||
if(SUCCEEDED(hres))
|
||||
This->protocol_unk = protocol_unk;
|
||||
else
|
||||
IUnknown_Release(protocol_unk);
|
||||
}
|
||||
else if(hres == CLASS_E_NOAGGREGATION)
|
||||
hres = IClassFactory_CreateInstance(cf, NULL, &IID_IInternetProtocol, (void**)&protocol);
|
||||
|
||||
IClassFactory_Release(cf);
|
||||
if(FAILED(hres))
|
||||
return hres;
|
||||
|
||||
hres = IUnknown_QueryInterface(protocol_unk, &IID_IInternetProtocol, (void**)&protocol);
|
||||
if(FAILED(hres)) {
|
||||
IUnknown_Release(protocol_unk);
|
||||
return hres;
|
||||
}
|
||||
}
|
||||
|
||||
StringFromCLSID(&clsid, &clsid_str);
|
||||
|
@ -703,8 +707,11 @@ static HRESULT WINAPI ProtocolHandler_Terminate(IInternetProtocol *iface, DWORD
|
|||
|
||||
if(This->protocol) {
|
||||
IInternetProtocol_Terminate(This->protocol, 0);
|
||||
IInternetProtocol_Release(This->protocol);
|
||||
This->protocol = NULL;
|
||||
|
||||
if (This->protocol_unk) {
|
||||
IInternetProtocol_Release(This->protocol);
|
||||
This->protocol = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
set_binding_sink(This, NULL, NULL);
|
||||
|
|
|
@ -3875,9 +3875,7 @@ static void test_CreateBinding(void)
|
|||
trace("Start >\n");
|
||||
expect_hrResult = S_OK;
|
||||
hres = IInternetProtocol_Start(protocol, test_url, &protocol_sink, &bind_info, 0, 0);
|
||||
todo_wine_if (no_aggregation)
|
||||
ok(hres == S_OK, "Start failed: %08x\n", hres);
|
||||
if (hres != S_OK) goto fail;
|
||||
trace("Start <\n");
|
||||
|
||||
CHECK_CALLED(QueryService_InternetProtocol);
|
||||
|
@ -4025,7 +4023,6 @@ todo_wine_if (no_aggregation)
|
|||
ok(hres == MK_E_SYNTAX, "Start failed: %08x, expected MK_E_SYNTAX\n", hres);
|
||||
CHECK_CALLED(QueryService_InternetProtocol);
|
||||
|
||||
fail:
|
||||
IInternetProtocol_Release(protocol);
|
||||
|
||||
IInternetSession_Release(session);
|
||||
|
|
Loading…
Reference in New Issue