rpcrt4: Move the initialising of the stub message structure nearer to the top of NdrClientCall2.
Set stubMsg.StackTop after calling the initialise function.
This commit is contained in:
parent
9d87447455
commit
fdda17deea
|
@ -410,13 +410,6 @@ LONG_PTR WINAPIV NdrClientCall2(PMIDL_STUB_DESC pStubDesc, PFORMAT_STRING pForma
|
|||
|
||||
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 @@ LONG_PTR WINAPIV NdrClientCall2(PMIDL_STUB_DESC pStubDesc, PFORMAT_STRING pForma
|
|||
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 @@ LONG_PTR WINAPIV NdrClientCall2(PMIDL_STUB_DESC pStubDesc, PFORMAT_STRING pForma
|
|||
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
|
||||
|
|
Loading…
Reference in New Issue