Robert Shearman : ole: Implement IRpcChannelBuffer::
GetDestCtx on the client side.
Alexandre Julliard
julliard at wine.codeweavers.com
Mon Mar 6 04:50:48 CST 2006
Module: wine
Branch: refs/heads/master
Commit: 7406cc210bd27015629d781bacb63c91bacd5872
URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=7406cc210bd27015629d781bacb63c91bacd5872
Author: Robert Shearman <rob at codeweavers.com>
Date: Sun Mar 5 13:37:34 2006 +0000
ole: Implement IRpcChannelBuffer::GetDestCtx on the client side.
---
dlls/ole32/compobj_private.h | 4 +++-
dlls/ole32/marshal.c | 5 ++++-
dlls/ole32/rpc.c | 26 ++++++++++++++++++++++----
3 files changed, 29 insertions(+), 6 deletions(-)
diff --git a/dlls/ole32/compobj_private.h b/dlls/ole32/compobj_private.h
index 8aeb0e0..66a7c1c 100644
--- a/dlls/ole32/compobj_private.h
+++ b/dlls/ole32/compobj_private.h
@@ -201,7 +201,9 @@ HRESULT marshal_object(APARTMENT *apt, S
struct dispatch_params;
void RPC_StartRemoting(struct apartment *apt);
-HRESULT RPC_CreateClientChannel(const OXID *oxid, const IPID *ipid, IRpcChannelBuffer **pipebuf);
+HRESULT RPC_CreateClientChannel(const OXID *oxid, const IPID *ipid,
+ DWORD dest_context, void *dest_context_data,
+ IRpcChannelBuffer **chan);
HRESULT RPC_CreateServerChannel(IRpcChannelBuffer **chan);
void RPC_ExecuteCall(struct dispatch_params *params);
HRESULT RPC_RegisterInterface(REFIID riid);
diff --git a/dlls/ole32/marshal.c b/dlls/ole32/marshal.c
index 95ff257..684d93d 100644
--- a/dlls/ole32/marshal.c
+++ b/dlls/ole32/marshal.c
@@ -1094,7 +1094,10 @@ static HRESULT unmarshal_object(const ST
if (hr == E_NOINTERFACE)
{
IRpcChannelBuffer *chanbuf;
- hr = RPC_CreateClientChannel(&stdobjref->oxid, &stdobjref->ipid, &chanbuf);
+ hr = RPC_CreateClientChannel(&stdobjref->oxid, &stdobjref->ipid,
+ proxy_manager->dest_context,
+ proxy_manager->dest_context_data,
+ &chanbuf);
if (hr == S_OK)
hr = proxy_manager_create_ifproxy(proxy_manager, stdobjref,
riid, chanbuf, &ifproxy);
diff --git a/dlls/ole32/rpc.c b/dlls/ole32/rpc.c
index 806c323..3c5f3ea 100644
--- a/dlls/ole32/rpc.c
+++ b/dlls/ole32/rpc.c
@@ -100,6 +100,8 @@ typedef struct
RPC_BINDING_HANDLE bind; /* handle to the remote server */
OXID oxid; /* apartment in which the channel is valid */
+ DWORD dest_context; /* returned from GetDestCtx */
+ LPVOID dest_context_data; /* returned from GetDestCtx */
} ClientRpcChannelBuffer;
struct dispatch_params
@@ -379,7 +381,19 @@ static HRESULT WINAPI ClientRpcChannelBu
return HRESULT_FROM_WIN32(status);
}
-static HRESULT WINAPI RpcChannelBuffer_GetDestCtx(LPRPCCHANNELBUFFER iface, DWORD* pdwDestContext, void** ppvDestContext)
+static HRESULT WINAPI ClientRpcChannelBuffer_GetDestCtx(LPRPCCHANNELBUFFER iface, DWORD* pdwDestContext, void** ppvDestContext)
+{
+ ClientRpcChannelBuffer *This = (ClientRpcChannelBuffer *)iface;
+
+ TRACE("(%p,%p)\n", pdwDestContext, ppvDestContext);
+
+ *pdwDestContext = This->dest_context;
+ *ppvDestContext = This->dest_context_data;
+
+ return S_OK;
+}
+
+static HRESULT WINAPI ServerRpcChannelBuffer_GetDestCtx(LPRPCCHANNELBUFFER iface, DWORD* pdwDestContext, void** ppvDestContext)
{
FIXME("(%p,%p), stub!\n", pdwDestContext, ppvDestContext);
return E_FAIL;
@@ -400,7 +414,7 @@ static const IRpcChannelBufferVtbl Clien
ClientRpcChannelBuffer_GetBuffer,
ClientRpcChannelBuffer_SendReceive,
ClientRpcChannelBuffer_FreeBuffer,
- RpcChannelBuffer_GetDestCtx,
+ ClientRpcChannelBuffer_GetDestCtx,
RpcChannelBuffer_IsConnected
};
@@ -412,12 +426,14 @@ static const IRpcChannelBufferVtbl Serve
ServerRpcChannelBuffer_GetBuffer,
ServerRpcChannelBuffer_SendReceive,
ServerRpcChannelBuffer_FreeBuffer,
- RpcChannelBuffer_GetDestCtx,
+ ServerRpcChannelBuffer_GetDestCtx,
RpcChannelBuffer_IsConnected
};
/* returns a channel buffer for proxies */
-HRESULT RPC_CreateClientChannel(const OXID *oxid, const IPID *ipid, IRpcChannelBuffer **chan)
+HRESULT RPC_CreateClientChannel(const OXID *oxid, const IPID *ipid,
+ DWORD dest_context, void *dest_context_data,
+ IRpcChannelBuffer **chan)
{
ClientRpcChannelBuffer *This;
WCHAR endpoint[200];
@@ -470,6 +486,8 @@ HRESULT RPC_CreateClientChannel(const OX
This->super.refs = 1;
This->bind = bind;
apartment_getoxid(COM_CurrentApt(), &This->oxid);
+ This->dest_context = dest_context;
+ This->dest_context_data = dest_context_data;
*chan = (IRpcChannelBuffer*)This;
More information about the wine-cvs
mailing list