Module: wine Branch: master Commit: 0abc475365b9842b5e9d704aec0ee251af4f190e URL: http://source.winehq.org/git/wine.git/?a=commit;h=0abc475365b9842b5e9d704aec...
Author: Alexandre Julliard julliard@winehq.org Date: Wed Sep 1 12:31:22 2010 +0200
rpcrt4: Retrieve the stack argument pointer in a more portable way in NdrMesProcEncodeDecode.
---
dlls/rpcrt4/ndr_es.c | 9 ++++----- 1 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/dlls/rpcrt4/ndr_es.c b/dlls/rpcrt4/ndr_es.c index 52200dc..9a56939 100644 --- a/dlls/rpcrt4/ndr_es.c +++ b/dlls/rpcrt4/ndr_es.c @@ -332,6 +332,7 @@ void WINAPIV NdrMesProcEncodeDecode(handle_t Handle, const MIDL_STUB_DESC * pStu /* the value to return to the client from the remote procedure */ LONG_PTR RetVal = 0; const RPC_CLIENT_INTERFACE *client_interface; + __ms_va_list args;
TRACE("Handle %p, pStubDesc %p, pFormat %p, ...\n", Handle, pStubDesc, pFormat);
@@ -396,11 +397,9 @@ void WINAPIV NdrMesProcEncodeDecode(handle_t Handle, const MIDL_STUB_DESC * pStu TRACE("MIDL stub version = 0x%x\n", pStubDesc->MIDLVersion);
/* needed for conformance of top-level objects */ -#ifdef __i386__ - pEsMsg->StubMsg.StackTop = *(unsigned char **)(&pFormat+1); -#else -# warning Stack not retrieved for your CPU architecture -#endif + __ms_va_start( args, pFormat ); + pEsMsg->StubMsg.StackTop = va_arg( args, unsigned char * ); + __ms_va_end( args );
switch (pEsMsg->Operation) {