ole32: Pass in the IID and IUnknown* of the object being executed to the server notification and message filter functions.
This commit is contained in:
parent
9208eef55c
commit
a089e57983
|
@ -200,7 +200,7 @@ BOOL stub_manager_notify_unmarshal(struct stub_manager *m, const IPID *ipid);
|
|||
BOOL stub_manager_is_table_marshaled(struct stub_manager *m, const IPID *ipid);
|
||||
void stub_manager_release_marshal_data(struct stub_manager *m, ULONG refs, const IPID *ipid);
|
||||
HRESULT ipid_to_stub_manager(const IPID *ipid, APARTMENT **stub_apt, struct stub_manager **stubmgr_ret);
|
||||
HRESULT ipid_get_dispatch_params(const IPID *ipid, APARTMENT **stub_apt, IRpcStubBuffer **stub, IRpcChannelBuffer **chan);
|
||||
HRESULT ipid_get_dispatch_params(const IPID *ipid, APARTMENT **stub_apt, IRpcStubBuffer **stub, IRpcChannelBuffer **chan, IID *iid, IUnknown **iface);
|
||||
HRESULT start_apartment_remote_unknown(void);
|
||||
|
||||
HRESULT marshal_object(APARTMENT *apt, STDOBJREF *stdobjref, REFIID riid, IUnknown *obj, MSHLFLAGS mshlflags);
|
||||
|
|
|
@ -118,6 +118,8 @@ struct dispatch_params
|
|||
RPCOLEMESSAGE *msg; /* message */
|
||||
IRpcStubBuffer *stub; /* stub buffer, if applicable */
|
||||
IRpcChannelBuffer *chan; /* server channel buffer, if applicable */
|
||||
IID iid; /* ID of interface being called */
|
||||
IUnknown *iface; /* interface being called */
|
||||
HANDLE handle; /* handle that will become signaled when call finishes */
|
||||
RPC_STATUS status; /* status (out) */
|
||||
HRESULT hr; /* hresult (out) */
|
||||
|
@ -586,7 +588,8 @@ static HRESULT WINAPI ClientRpcChannelBuffer_SendReceive(LPRPCCHANNELBUFFER ifac
|
|||
* from DllMain */
|
||||
|
||||
RpcBindingInqObject(message_state->binding_handle, &ipid);
|
||||
hr = ipid_get_dispatch_params(&ipid, &apt, ¶ms->stub, ¶ms->chan);
|
||||
hr = ipid_get_dispatch_params(&ipid, &apt, ¶ms->stub, ¶ms->chan,
|
||||
¶ms->iid, ¶ms->iface);
|
||||
params->handle = ClientRpcChannelBuffer_GetEventHandle(This);
|
||||
if ((hr == S_OK) && !apt->multi_threaded)
|
||||
{
|
||||
|
@ -954,12 +957,12 @@ void RPC_ExecuteCall(struct dispatch_params *params)
|
|||
message_state->prefix_data_len = original_buffer - (char *)msg->Buffer;
|
||||
message_state->binding_handle = msg->Handle;
|
||||
|
||||
message_state->channel_hook_info.iid = IID_NULL; /* FIXME */
|
||||
message_state->channel_hook_info.iid = params->iid;
|
||||
message_state->channel_hook_info.cbSize = sizeof(message_state->channel_hook_info);
|
||||
message_state->channel_hook_info.uCausality = orpcthis.cid;
|
||||
message_state->channel_hook_info.dwServerPid = GetCurrentProcessId();
|
||||
message_state->channel_hook_info.iMethod = msg->ProcNum;
|
||||
message_state->channel_hook_info.pObject = NULL; /* FIXME */
|
||||
message_state->channel_hook_info.pObject = params->iface;
|
||||
|
||||
if (orpcthis.extensions && first_wire_orpc_extent &&
|
||||
orpcthis.extensions->size)
|
||||
|
@ -975,8 +978,8 @@ void RPC_ExecuteCall(struct dispatch_params *params)
|
|||
DWORD handlecall;
|
||||
INTERFACEINFO interface_info;
|
||||
|
||||
interface_info.pUnk = NULL; /* FIXME */
|
||||
interface_info.iid = IID_NULL; /* FIXME */
|
||||
interface_info.pUnk = params->iface;
|
||||
interface_info.iid = params->iid;
|
||||
interface_info.wMethod = msg->ProcNum;
|
||||
handlecall = IMessageFilter_HandleInComingCall(COM_CurrentApt()->filter,
|
||||
CALLTYPE_TOPLEVEL /* FIXME */,
|
||||
|
@ -1033,7 +1036,8 @@ static void __RPC_STUB dispatch_rpc(RPC_MESSAGE *msg)
|
|||
params = HeapAlloc(GetProcessHeap(), 0, sizeof(*params));
|
||||
if (!params) return RpcRaiseException(E_OUTOFMEMORY);
|
||||
|
||||
hr = ipid_get_dispatch_params(&ipid, &apt, ¶ms->stub, ¶ms->chan);
|
||||
hr = ipid_get_dispatch_params(&ipid, &apt, ¶ms->stub, ¶ms->chan,
|
||||
¶ms->iid, ¶ms->iface);
|
||||
if (hr != S_OK)
|
||||
{
|
||||
ERR("no apartment found for ipid %s\n", debugstr_guid(&ipid));
|
||||
|
|
|
@ -366,10 +366,11 @@ HRESULT ipid_to_stub_manager(const IPID *ipid, APARTMENT **stub_apt, struct stub
|
|||
}
|
||||
|
||||
/* gets the apartment, stub and channel of an object. the caller must
|
||||
* release the references to all objects if the function returned success,
|
||||
* otherwise no references are returned. */
|
||||
* release the references to all objects (except iface) if the function
|
||||
* returned success, otherwise no references are returned. */
|
||||
HRESULT ipid_get_dispatch_params(const IPID *ipid, APARTMENT **stub_apt,
|
||||
IRpcStubBuffer **stub, IRpcChannelBuffer **chan)
|
||||
IRpcStubBuffer **stub, IRpcChannelBuffer **chan,
|
||||
IID *iid, IUnknown **iface)
|
||||
{
|
||||
struct stub_manager *stubmgr;
|
||||
struct ifstub *ifstub;
|
||||
|
@ -387,6 +388,8 @@ HRESULT ipid_get_dispatch_params(const IPID *ipid, APARTMENT **stub_apt,
|
|||
*chan = ifstub->chan;
|
||||
IRpcChannelBuffer_AddRef(*chan);
|
||||
*stub_apt = apt;
|
||||
*iid = ifstub->iid;
|
||||
*iface = ifstub->iface;
|
||||
|
||||
stub_manager_int_release(stubmgr);
|
||||
return S_OK;
|
||||
|
|
Loading…
Reference in New Issue