Jacek Caban : rpcrt4: Fix context handle return value marshaling.
Module: wine Branch: master Commit: b6c48de699a11097b9557d045c0aa78758d615a8 URL: https://source.winehq.org/git/wine.git/?a=commit;h=b6c48de699a11097b9557d045... Author: Jacek Caban <jacek(a)codeweavers.com> Date: Fri Jan 25 12:01:16 2019 +0100 rpcrt4: Fix context handle return value marshaling. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/rpcrt4/ndr_stubless.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/dlls/rpcrt4/ndr_stubless.c b/dlls/rpcrt4/ndr_stubless.c index c2f260c..813d7e8 100644 --- a/dlls/rpcrt4/ndr_stubless.c +++ b/dlls/rpcrt4/ndr_stubless.c @@ -1232,6 +1232,7 @@ static LONG_PTR *stub_do_args(MIDL_STUB_MESSAGE *pStubMsg, { NDR_SCONTEXT ctxt = NdrContextHandleInitialize(pStubMsg, pTypeFormat); *(void **)pArg = NDRSContextValue(ctxt); + if (params[i].attr.IsReturn) retval_ptr = (LONG_PTR *)NDRSContextValue(ctxt); } else { @@ -1243,6 +1244,7 @@ static LONG_PTR *stub_do_args(MIDL_STUB_MESSAGE *pStubMsg, } } } + if (!retval_ptr && params[i].attr.IsReturn) retval_ptr = (LONG_PTR *)pArg; break; case STUBLESS_UNMARSHAL: if (params[i].attr.ServerAllocSize) @@ -1260,9 +1262,6 @@ static LONG_PTR *stub_do_args(MIDL_STUB_MESSAGE *pStubMsg, RpcRaiseException(RPC_S_INTERNAL_ERROR); } TRACE("\tmemory addr (after): %p -> %p\n", pArg, *(unsigned char **)pArg); - - /* make a note of the address of the return value parameter for later */ - if (params[i].attr.IsReturn) retval_ptr = (LONG_PTR *)pArg; } return retval_ptr; }
participants (1)
-
Alexandre Julliard