Robert Shearman : rpcrt4: Fix NdrConformantArrayMemorySize.
Alexandre Julliard
julliard at wine.codeweavers.com
Thu May 18 03:56:51 CDT 2006
Module: wine
Branch: refs/heads/master
Commit: 4fae04b2f5c57c1b5d3bfcf34b2f79e9d5d40b2f
URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=4fae04b2f5c57c1b5d3bfcf34b2f79e9d5d40b2f
Author: Robert Shearman <rob at codeweavers.com>
Date: Thu May 18 03:39:58 2006 +0100
rpcrt4: Fix NdrConformantArrayMemorySize.
---
dlls/rpcrt4/ndr_marshall.c | 13 +++++++++----
1 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/dlls/rpcrt4/ndr_marshall.c b/dlls/rpcrt4/ndr_marshall.c
index 3ba3194..4c7791e 100644
--- a/dlls/rpcrt4/ndr_marshall.c
+++ b/dlls/rpcrt4/ndr_marshall.c
@@ -2118,17 +2118,22 @@ unsigned long WINAPI NdrConformantArrayM
PFORMAT_STRING pFormat)
{
DWORD size = 0, esize = *(const WORD*)(pFormat+2);
- unsigned char *buffer;
+ unsigned char alignment = pFormat[1] + 1;
TRACE("(%p,%p)\n", pStubMsg, pFormat);
if (pFormat[0] != RPC_FC_CARRAY) FIXME("format=%d\n", pFormat[0]);
- buffer = pStubMsg->Buffer;
pFormat = ReadConformance(pStubMsg, pFormat+4);
- pStubMsg->Buffer = buffer;
size = pStubMsg->MaxCount;
+ pStubMsg->MemorySize += size*esize;
- return size*esize;
+ ALIGN_POINTER(pStubMsg->Buffer, alignment);
+ pStubMsg->BufferMark = pStubMsg->Buffer;
+ pStubMsg->Buffer += size*esize;
+
+ EmbeddedPointerMemorySize(pStubMsg, pFormat);
+
+ return pStubMsg->MemorySize;
}
/***********************************************************************
More information about the wine-cvs
mailing list