Module: wine Branch: refs/heads/master Commit: fdda17deea1777303d1ce74873f0ea98e56e662a URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=fdda17deea1777303d1ce748...
Author: Robert Shearman rob@codeweavers.com Date: Wed May 24 23:03:18 2006 +0100
rpcrt4: Move the initialising of the stub message structure nearer to the top of NdrClientCall2.
Set stubMsg.StackTop after calling the initialise function.
---
dlls/rpcrt4/ndr_stubless.c | 32 ++++++++++++++++---------------- 1 files changed, 16 insertions(+), 16 deletions(-)
diff --git a/dlls/rpcrt4/ndr_stubless.c b/dlls/rpcrt4/ndr_stubless.c index 15b045d..1997361 100644 --- a/dlls/rpcrt4/ndr_stubless.c +++ b/dlls/rpcrt4/ndr_stubless.c @@ -410,13 +410,6 @@ LONG_PTR WINAPIV NdrClientCall2(PMIDL_ST
TRACE("pStubDesc %p, pFormat %p, ...\n", pStubDesc, pFormat);
- /* needed for conformance of top-level objects */ -#ifdef __i386__ - stubMsg.StackTop = *(unsigned char **)(&pFormat+1); -#else -# warning Stack not retrieved for your CPU architecture -#endif - /* Later NDR language versions probably won't be backwards compatible */ if (pStubDesc->Version > 0x50002) { @@ -439,9 +432,25 @@ #endif current_offset = sizeof(NDR_PROC_HEADER); }
+ if (pProcHeader->Oi_flags & RPC_FC_PROC_OIF_OBJECT) + { + /* object is always the first argument */ + This = *(void **)ARG_FROM_OFFSET(stubMsg, 0); + NdrProxyInitialize(This, &rpcMsg, &stubMsg, pStubDesc, procedure_number); + } + else + NdrClientInitializeNew(&rpcMsg, &stubMsg, pStubDesc, procedure_number); + TRACE("Oi_flags = 0x%02x\n", pProcHeader->Oi_flags); TRACE("MIDL stub version = 0x%lx\n", pStubDesc->MIDLVersion);
+ /* needed for conformance of top-level objects */ +#ifdef __i386__ + stubMsg.StackTop = *(unsigned char **)(&pFormat+1); +#else +# warning Stack not retrieved for your CPU architecture +#endif + /* we only need a handle if this isn't an object method */ if (!(pProcHeader->Oi_flags & RPC_FC_PROC_OIF_OBJECT)) { @@ -547,15 +556,6 @@ #endif current_offset += pExtensions->Size; }
- if (pProcHeader->Oi_flags & RPC_FC_PROC_OIF_OBJECT) - { - /* object is always the first argument */ - This = *(void **)ARG_FROM_OFFSET(stubMsg, 0); - NdrProxyInitialize(This, &rpcMsg, &stubMsg, pStubDesc, procedure_number); - } - else - NdrClientInitializeNew(&rpcMsg, &stubMsg, pStubDesc, procedure_number); - /* create the full pointer translation tables, if requested */ if (pProcHeader->Oi_flags & RPC_FC_PROC_OIF_FULLPTR) #if 0