Rob Shearman : rpcrt4: Add support for ServerAllocSize parameters.
Alexandre Julliard
julliard at wine.codeweavers.com
Tue Jun 26 07:11:45 CDT 2007
Module: wine
Branch: master
Commit: a1dca20dd7086194a9b452b93c3feabb72979576
URL: http://source.winehq.org/git/wine.git/?a=commit;h=a1dca20dd7086194a9b452b93c3feabb72979576
Author: Rob Shearman <rob at codeweavers.com>
Date: Mon Jun 25 14:21:55 2007 +0100
rpcrt4: Add support for ServerAllocSize parameters.
---
dlls/rpcrt4/ndr_stubless.c | 14 +++++++++-----
1 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/dlls/rpcrt4/ndr_stubless.c b/dlls/rpcrt4/ndr_stubless.c
index 6a581a0..d6118fb 100644
--- a/dlls/rpcrt4/ndr_stubless.c
+++ b/dlls/rpcrt4/ndr_stubless.c
@@ -1339,10 +1339,6 @@ LONG WINAPI NdrStubCall2(
TRACE("\tstack_offset: 0x%x\n", current_stack_offset);
TRACE("\tmemory addr (before): %p -> %p\n", pArg, *(unsigned char **)pArg);
- if (pParam->param_attributes.ServerAllocSize)
- FIXME("ServerAllocSize of %d ignored for parameter %d\n",
- pParam->param_attributes.ServerAllocSize * 8, i);
-
if (pParam->param_attributes.IsBasetype)
{
const unsigned char *pTypeFormat =
@@ -1360,9 +1356,12 @@ LONG WINAPI NdrStubCall2(
else
call_marshaller(&stubMsg, pArg, pTypeFormat);
}
- /* FIXME: call call_freer here */
break;
case STUBLESS_UNMARSHAL:
+ if (pParam->param_attributes.ServerAllocSize)
+ *(void **)pArg = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY,
+ pParam->param_attributes.ServerAllocSize * 8);
+
if (pParam->param_attributes.IsIn)
{
if (pParam->param_attributes.IsSimpleRef)
@@ -1417,6 +1416,10 @@ LONG WINAPI NdrStubCall2(
/* FIXME: call call_freer here for IN types */
break;
case STUBLESS_UNMARSHAL:
+ if (pParam->param_attributes.ServerAllocSize)
+ *(void **)pArg = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY,
+ pParam->param_attributes.ServerAllocSize * 8);
+
if (pParam->param_attributes.IsIn)
{
if (pParam->param_attributes.IsByValue)
@@ -1425,6 +1428,7 @@ LONG WINAPI NdrStubCall2(
call_unmarshaller(&stubMsg, (unsigned char **)pArg, pTypeFormat, 0);
}
else if (pParam->param_attributes.IsOut &&
+ !pParam->param_attributes.ServerAllocSize &&
!pParam->param_attributes.IsByValue)
{
DWORD size = calc_arg_size(&stubMsg, pTypeFormat);
More information about the wine-cvs
mailing list