shlwapi: Implement IConnectionPoint_SimpleInvoke.
This commit is contained in:
parent
f9a54ebc51
commit
b63e9a7828
|
@ -2855,18 +2855,62 @@ HRESULT WINAPI SHPackDispParams(LPVOID w, LPVOID x, LPVOID y, LPVOID z)
|
|||
return E_FAIL;
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* SHLWAPI_InvokeByIID
|
||||
*
|
||||
* This helper function calls IDispatch::Invoke for each sink
|
||||
* which implements given iid or IDispatch.
|
||||
*
|
||||
*/
|
||||
static HRESULT SHLWAPI_InvokeByIID(
|
||||
IConnectionPoint* iCP,
|
||||
REFIID iid,
|
||||
DISPID dispId,
|
||||
DISPPARAMS* dispParams)
|
||||
{
|
||||
IEnumConnections *enumerator;
|
||||
CONNECTDATA rgcd;
|
||||
|
||||
HRESULT result = IConnectionPoint_EnumConnections(iCP, &enumerator);
|
||||
if (FAILED(result))
|
||||
return result;
|
||||
|
||||
while(IEnumConnections_Next(enumerator, 1, &rgcd, NULL)==S_OK)
|
||||
{
|
||||
IDispatch *dispIface;
|
||||
if (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);
|
||||
IDispatch_Release(dispIface);
|
||||
}
|
||||
}
|
||||
|
||||
IEnumConnections_Release(enumerator);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
* @ [SHLWAPI.284]
|
||||
*
|
||||
* _IConnectionPoint_SimpleInvoke
|
||||
* IConnectionPoint_SimpleInvoke
|
||||
*/
|
||||
DWORD WINAPI IConnectionPoint_SimpleInvoke(
|
||||
LPVOID x,
|
||||
LPVOID y,
|
||||
LPVOID z)
|
||||
HRESULT WINAPI IConnectionPoint_SimpleInvoke(
|
||||
IConnectionPoint* iCP,
|
||||
DISPID dispId,
|
||||
DISPPARAMS* dispParams)
|
||||
{
|
||||
FIXME("(%p %p %p) stub\n",x,y,z);
|
||||
return 0;
|
||||
IID iid;
|
||||
HRESULT result;
|
||||
|
||||
TRACE("(%p)->(0x%x %p)\n",iCP,dispId,dispParams);
|
||||
|
||||
result = IConnectionPoint_GetConnectionInterface(iCP, &iid);
|
||||
if (SUCCEEDED(result))
|
||||
result = SHLWAPI_InvokeByIID(iCP, &iid, dispId, dispParams);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
|
|
|
@ -281,7 +281,7 @@
|
|||
281 stdcall -noname SHPackDispParamsV(ptr ptr ptr ptr)
|
||||
282 stdcall -noname SHPackDispParams(ptr ptr ptr ptr)
|
||||
283 stub -noname IConnectionPoint_InvokeWithCancel
|
||||
284 stdcall -noname IConnectionPoint_SimpleInvoke(ptr ptr ptr)
|
||||
284 stdcall -noname IConnectionPoint_SimpleInvoke(ptr long ptr)
|
||||
285 stdcall -noname IConnectionPoint_OnChanged(ptr long)
|
||||
286 stub -noname IUnknown_CPContainerInvokeParam
|
||||
287 stdcall -noname IUnknown_CPContainerOnChanged(ptr long)
|
||||
|
|
Loading…
Reference in New Issue