diff --git a/dlls/ole32/compobj_private.h b/dlls/ole32/compobj_private.h index 5c8f5778bde..aee19f28bcd 100644 --- a/dlls/ole32/compobj_private.h +++ b/dlls/ole32/compobj_private.h @@ -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); diff --git a/dlls/ole32/rpc.c b/dlls/ole32/rpc.c index 5d66891b567..586562ec3a6 100644 --- a/dlls/ole32/rpc.c +++ b/dlls/ole32/rpc.c @@ -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)); diff --git a/dlls/ole32/stubmanager.c b/dlls/ole32/stubmanager.c index 520e56d2709..264a2e56214 100644 --- a/dlls/ole32/stubmanager.c +++ b/dlls/ole32/stubmanager.c @@ -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;