Rob Shearman : rpcrt4: Save the buffer in EmbeddedPointerMemorySize, like EmbeddedPointerUnmarshall does.
Alexandre Julliard
julliard at winehq.org
Sat Dec 8 13:43:43 CST 2007
Module: wine
Branch: master
Commit: 417b9d80f27c3b03d5ef2282b0649d1cd02e75fb
URL: http://source.winehq.org/git/wine.git/?a=commit;h=417b9d80f27c3b03d5ef2282b0649d1cd02e75fb
Author: Rob Shearman <rob at codeweavers.com>
Date: Sat Dec 8 17:46:57 2007 +0000
rpcrt4: Save the buffer in EmbeddedPointerMemorySize, like EmbeddedPointerUnmarshall does.
---
dlls/rpcrt4/ndr_marshall.c | 14 +++++++++++++-
1 files changed, 13 insertions(+), 1 deletions(-)
diff --git a/dlls/rpcrt4/ndr_marshall.c b/dlls/rpcrt4/ndr_marshall.c
index 6463a56..7578221 100644
--- a/dlls/rpcrt4/ndr_marshall.c
+++ b/dlls/rpcrt4/ndr_marshall.c
@@ -1464,12 +1464,18 @@ static unsigned long EmbeddedPointerMemorySize(PMIDL_STUB_MESSAGE pStubMsg,
unsigned char *Mark = pStubMsg->BufferMark;
unsigned rep, count, stride;
unsigned i;
+ unsigned char *saved_buffer = NULL;
TRACE("(%p,%p)\n", pStubMsg, pFormat);
if (pStubMsg->IgnoreEmbeddedPointers) return 0;
- FIXME("(%p,%p): stub\n", pStubMsg, pFormat);
+ if (pStubMsg->PointerBufferMark)
+ {
+ saved_buffer = pStubMsg->Buffer;
+ pStubMsg->Buffer = pStubMsg->PointerBufferMark;
+ pStubMsg->PointerBufferMark = NULL;
+ }
if (*pFormat != RPC_FC_PP) return 0;
pFormat += 2;
@@ -1509,6 +1515,12 @@ static unsigned long EmbeddedPointerMemorySize(PMIDL_STUB_MESSAGE pStubMsg,
pFormat += 8 * count;
}
+ if (saved_buffer)
+ {
+ pStubMsg->PointerBufferMark = pStubMsg->Buffer;
+ pStubMsg->Buffer = saved_buffer;
+ }
+
return 0;
}
More information about the wine-cvs
mailing list