Commit 3dbc0b06 authored by Aric Stewart's avatar Aric Stewart Committed by Alexandre Julliard

shlwapi: Failure in IConnectionPoint_GetConnectionInterface does not prevent Invoking.

parent 56d1a7c0
......@@ -2938,7 +2938,7 @@ static HRESULT SHLWAPI_InvokeByIID(
while(IEnumConnections_Next(enumerator, 1, &rgcd, NULL)==S_OK)
{
IDispatch *dispIface;
if (SUCCEEDED(IUnknown_QueryInterface(rgcd.pUnk, iid, (LPVOID*)&dispIface)) ||
if ((iid && SUCCEEDED(IUnknown_QueryInterface(rgcd.pUnk, iid, (LPVOID*)&dispIface))) ||
SUCCEEDED(IUnknown_QueryInterface(rgcd.pUnk, &IID_IDispatch, (LPVOID*)&dispIface)))
{
IDispatch_Invoke(dispIface, dispId, &IID_NULL, 0, DISPATCH_METHOD, dispParams, NULL, NULL, NULL);
......@@ -2966,6 +2966,8 @@ HRESULT WINAPI IConnectionPoint_InvokeWithCancel( IConnectionPoint* iCP,
result = IConnectionPoint_GetConnectionInterface(iCP, &iid);
if (SUCCEEDED(result))
result = SHLWAPI_InvokeByIID(iCP, &iid, dispId, dispParams);
else
result = SHLWAPI_InvokeByIID(iCP, NULL, dispId, dispParams);
return result;
}
......@@ -2989,6 +2991,8 @@ HRESULT WINAPI IConnectionPoint_SimpleInvoke(
result = IConnectionPoint_GetConnectionInterface(iCP, &iid);
if (SUCCEEDED(result))
result = SHLWAPI_InvokeByIID(iCP, &iid, dispId, dispParams);
else
result = SHLWAPI_InvokeByIID(iCP, NULL, dispId, dispParams);
return result;
}
......
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