shlwapi: Failure in IConnectionPoint_GetConnectionInterface does not prevent Invoking.

This commit is contained in:
Aric Stewart 2009-12-10 13:16:06 -06:00 committed by Alexandre Julliard
parent 56d1a7c003
commit 3dbc0b0667
1 changed files with 5 additions and 1 deletions

View File

@ -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;
}