Module: wine
Branch: master
Commit: ffffcfa239c10da92160fa2991b1dcfdbca77753
URL: http://source.winehq.org/git/wine.git/?a=commit;h=ffffcfa239c10da92160fa299…
Author: Rob Shearman <rob(a)codeweavers.com>
Date: Tue Jan 15 20:55:40 2008 +0000
rpcrt4: Move the setting of retval_ptr outside of any particular stub phase in stub_do_args and stub_do_old_args.
After the change in order of phases it was no longer being set in the
last phase and so caused all stubless functions to appear to have no
return value.
---
dlls/rpcrt4/ndr_stubless.c | 21 +++++++++++----------
1 files changed, 11 insertions(+), 10 deletions(-)
diff --git a/dlls/rpcrt4/ndr_stubless.c b/dlls/rpcrt4/ndr_stubless.c
index 8a99286..2a16601 100644
--- a/dlls/rpcrt4/ndr_stubless.c
+++ b/dlls/rpcrt4/ndr_stubless.c
@@ -902,6 +902,10 @@ static LONG_PTR *stub_do_args(MIDL_STUB_MESSAGE *pStubMsg,
TRACE("\tbase type: 0x%02x\n", *pTypeFormat);
+ /* make a note of the address of the return value parameter for later */
+ if (pParam->param_attributes.IsReturn)
+ retval_ptr = (LONG_PTR *)pArg;
+
switch (phase)
{
case STUBLESS_MARSHAL:
@@ -931,11 +935,6 @@ static LONG_PTR *stub_do_args(MIDL_STUB_MESSAGE *pStubMsg,
else
call_unmarshaller(pStubMsg, &pArg, pTypeFormat, 0);
}
-
- /* make a note of the address of the return value parameter for later */
- if (pParam->param_attributes.IsReturn)
- retval_ptr = (LONG_PTR *)pArg;
-
break;
case STUBLESS_CALCSIZE:
if (pParam->param_attributes.IsOut || pParam->param_attributes.IsReturn)
@@ -1082,6 +1081,9 @@ static LONG_PTR *stub_do_old_args(MIDL_STUB_MESSAGE *pStubMsg,
TRACE("\tbase type 0x%02x\n", *pTypeFormat);
+ if (pParam->param_direction == RPC_FC_RETURN_PARAM_BASETYPE)
+ retval_ptr = (LONG_PTR *)pArg;
+
switch (phase)
{
case STUBLESS_MARSHAL:
@@ -1095,9 +1097,7 @@ static LONG_PTR *stub_do_old_args(MIDL_STUB_MESSAGE *pStubMsg,
case STUBLESS_UNMARSHAL:
if (pParam->param_direction == RPC_FC_IN_PARAM_BASETYPE)
call_unmarshaller(pStubMsg, &pArg, pTypeFormat, 0);
- else if (pParam->param_direction == RPC_FC_RETURN_PARAM_BASETYPE)
- retval_ptr = (LONG_PTR *)pArg;
- break;
+ break;
case STUBLESS_CALCSIZE:
if (pParam->param_direction == RPC_FC_RETURN_PARAM_BASETYPE)
call_buffer_sizer(pStubMsg, pArg, pTypeFormat);
@@ -1119,6 +1119,9 @@ static LONG_PTR *stub_do_old_args(MIDL_STUB_MESSAGE *pStubMsg,
TRACE("\tcomplex type 0x%02x\n", *pTypeFormat);
+ if (pParam->param_direction == RPC_FC_RETURN_PARAM)
+ retval_ptr = (LONG_PTR *)pArg;
+
switch (phase)
{
case STUBLESS_MARSHAL:
@@ -1150,8 +1153,6 @@ static LONG_PTR *stub_do_old_args(MIDL_STUB_MESSAGE *pStubMsg,
if (pParam->param_direction == RPC_FC_IN_OUT_PARAM ||
pParam->param_direction == RPC_FC_IN_PARAM)
call_unmarshaller(pStubMsg, (unsigned char **)pArg, pTypeFormat, 0);
- else if (pParam->param_direction == RPC_FC_RETURN_PARAM)
- retval_ptr = (LONG_PTR *)pArg;
break;
case STUBLESS_CALCSIZE:
if (pParam->param_direction == RPC_FC_OUT_PARAM ||