Module: wine Branch: master Commit: a089e57983cdc439bb6c10d4356bb3a6276b9d76 URL: http://source.winehq.org/git/wine.git/?a=commit;h=a089e57983cdc439bb6c10d435...
Author: Rob Shearman rob@codeweavers.com Date: Tue Dec 19 19:37:15 2006 +0000
ole32: Pass in the IID and IUnknown* of the object being executed to the server notification and message filter functions.
---
dlls/ole32/compobj_private.h | 2 +- dlls/ole32/rpc.c | 16 ++++++++++------ dlls/ole32/stubmanager.c | 9 ++++++--- 3 files changed, 17 insertions(+), 10 deletions(-)
diff --git a/dlls/ole32/compobj_private.h b/dlls/ole32/compobj_private.h index 5c8f577..aee19f2 100644 --- a/dlls/ole32/compobj_private.h +++ b/dlls/ole32/compobj_private.h @@ -200,7 +200,7 @@ BOOL stub_manager_notify_unmarshal(struc 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 5d66891..586562e 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 ClientRpcChannelBu * 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_par 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_par 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_ 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 520e56d..264a2e5 100644 --- a/dlls/ole32/stubmanager.c +++ b/dlls/ole32/stubmanager.c @@ -366,10 +366,11 @@ HRESULT ipid_to_stub_manager(const IPID }
/* 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 I *chan = ifstub->chan; IRpcChannelBuffer_AddRef(*chan); *stub_apt = apt; + *iid = ifstub->iid; + *iface = ifstub->iface;
stub_manager_int_release(stubmgr); return S_OK;