Robert Shearman : rpcrt4:
Fix NdrStubGetBuffer to use the IRpcChannelBuffer object since
Alexandre Julliard
julliard at wine.codeweavers.com
Thu Sep 7 03:45:43 CDT 2006
Module: wine
Branch: master
Commit: 3e01da183864acd14c4cfaa659fd8b7fa7cf61fe
URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=3e01da183864acd14c4cfaa659fd8b7fa7cf61fe
Author: Robert Shearman <rob at codeweavers.com>
Date: Tue Aug 29 21:14:42 2006 +0100
rpcrt4: Fix NdrStubGetBuffer to use the IRpcChannelBuffer object since
IRpcChannelBuffer_GetBuffer may put extra data onto the wire for ORPC
calls.
---
dlls/rpcrt4/cstub.c | 18 ++++++++++++++----
1 files changed, 14 insertions(+), 4 deletions(-)
diff --git a/dlls/rpcrt4/cstub.c b/dlls/rpcrt4/cstub.c
index 5b61da4..259956a 100644
--- a/dlls/rpcrt4/cstub.c
+++ b/dlls/rpcrt4/cstub.c
@@ -280,14 +280,24 @@ void WINAPI NdrStubInitialize(PRPC_MESSA
/***********************************************************************
* NdrStubGetBuffer [RPCRT4.@]
*/
-void WINAPI NdrStubGetBuffer(LPRPCSTUBBUFFER This,
+void WINAPI NdrStubGetBuffer(LPRPCSTUBBUFFER iface,
LPRPCCHANNELBUFFER pRpcChannelBuffer,
PMIDL_STUB_MESSAGE pStubMsg)
{
- TRACE("(%p,%p)\n", This, pStubMsg);
- pStubMsg->pRpcChannelBuffer = pRpcChannelBuffer;
+ CStdStubBuffer *This = (CStdStubBuffer *)iface;
+ HRESULT hr;
+
+ TRACE("(%p, %p, %p)\n", This, pRpcChannelBuffer, pStubMsg);
+
pStubMsg->RpcMsg->BufferLength = pStubMsg->BufferLength;
- I_RpcGetBuffer(pStubMsg->RpcMsg); /* ? */
+ hr = IRpcChannelBuffer_GetBuffer(pRpcChannelBuffer,
+ (RPCOLEMESSAGE *)pStubMsg->RpcMsg, STUB_HEADER(This).piid);
+ if (FAILED(hr))
+ {
+ RpcRaiseException(hr);
+ return;
+ }
+
pStubMsg->BufferStart = pStubMsg->RpcMsg->Buffer;
pStubMsg->BufferEnd = pStubMsg->BufferStart + pStubMsg->BufferLength;
pStubMsg->Buffer = pStubMsg->BufferStart;
More information about the wine-cvs
mailing list