Robert Shearman : rpcrt4:
Set the Memory field of the stub message structure to the
Alexandre Julliard
julliard at wine.codeweavers.com
Thu May 25 04:16:13 CDT 2006
Module: wine
Branch: refs/heads/master
Commit: ec2a9cef3a52bd59a1faa028b7a4c49123c02285
URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=ec2a9cef3a52bd59a1faa028b7a4c49123c02285
Author: Robert Shearman <rob at codeweavers.com>
Date: Wed May 24 23:04:35 2006 +0100
rpcrt4: Set the Memory field of the stub message structure to the
start of the memory that an embedded pointer is embedded in so that
FC_POINTER conformance works correctly.
---
dlls/rpcrt4/ndr_marshall.c | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/dlls/rpcrt4/ndr_marshall.c b/dlls/rpcrt4/ndr_marshall.c
index f6888c8..e7e1ff9 100644
--- a/dlls/rpcrt4/ndr_marshall.c
+++ b/dlls/rpcrt4/ndr_marshall.c
@@ -1041,7 +1041,11 @@ static unsigned char * EmbeddedPointerMa
for (u=0; u<count; u++,info+=8) {
unsigned char *memptr = membase + *(const SHORT*)&info[0];
unsigned char *bufptr = bufbase + *(const SHORT*)&info[2];
+ unsigned char *saved_memory = pStubMsg->Memory;
+
+ pStubMsg->Memory = pMemory;
PointerMarshall(pStubMsg, bufptr, *(unsigned char**)memptr, info+4);
+ pStubMsg->Memory = saved_memory;
}
}
pFormat += 8 * count;
@@ -1172,7 +1176,11 @@ static void EmbeddedPointerBufferSize(PM
unsigned u;
for (u=0; u<count; u++,info+=8) {
unsigned char *memptr = membase + *(const SHORT*)&info[0];
+ unsigned char *saved_memory = pStubMsg->Memory;
+
+ pStubMsg->Memory = pMemory;
PointerBufferSize(pStubMsg, *(unsigned char**)memptr, info+4);
+ pStubMsg->Memory = saved_memory;
}
}
pFormat += 8 * count;
@@ -1291,7 +1299,11 @@ static void EmbeddedPointerFree(PMIDL_ST
unsigned u;
for (u=0; u<count; u++,info+=8) {
unsigned char *memptr = membase + *(const SHORT*)&info[0];
+ unsigned char *saved_memory = pStubMsg->Memory;
+
+ pStubMsg->Memory = pMemory;
PointerFree(pStubMsg, *(unsigned char**)memptr, info+4);
+ pStubMsg->Memory = saved_memory;
}
}
pFormat += 8 * count;
More information about the wine-cvs
mailing list