Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
9d874474
Commit
9d874474
authored
May 24, 2006
by
Robert Shearman
Committed by
Alexandre Julliard
May 25, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rpcrt4: Store the arguments exclusively in stubMsg.StackTop.
parent
b9f36c3f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
14 deletions
+15
-14
ndr_stubless.c
dlls/rpcrt4/ndr_stubless.c
+15
-14
No files found.
dlls/rpcrt4/ndr_stubless.c
View file @
9d874474
...
...
@@ -368,8 +368,7 @@ static void WINAPI dump_INTERPRETER_OPT_FLAGS(INTERPRETER_OPT_FLAGS Oi2Flags)
TRACE
(
"
\n
"
);
}
/* FIXME: this will be different on other plaftorms than i386 */
#define ARG_FROM_OFFSET(args, offset) (*(unsigned char **)args + offset)
#define ARG_FROM_OFFSET(stubMsg, offset) (stubMsg.StackTop + offset)
/* the return type should be CLIENT_CALL_RETURN, but this is incompatible
* with the way gcc returns structures. "void *" should be the largest type
...
...
@@ -377,8 +376,6 @@ static void WINAPI dump_INTERPRETER_OPT_FLAGS(INTERPRETER_OPT_FLAGS Oi2Flags)
LONG_PTR
WINAPIV
NdrClientCall2
(
PMIDL_STUB_DESC
pStubDesc
,
PFORMAT_STRING
pFormat
,
...)
{
/* pointer to start of stack where arguments start */
/* FIXME: not portable */
unsigned
char
*
args
=
(
unsigned
char
*
)(
&
pFormat
+
1
);
RPC_MESSAGE
rpcMsg
;
MIDL_STUB_MESSAGE
stubMsg
;
handle_t
hBinding
=
NULL
;
...
...
@@ -412,7 +409,13 @@ LONG_PTR WINAPIV NdrClientCall2(PMIDL_STUB_DESC pStubDesc, PFORMAT_STRING pForma
void
*
This
=
NULL
;
TRACE
(
"pStubDesc %p, pFormat %p, ...
\n
"
,
pStubDesc
,
pFormat
);
TRACE
(
"&first_argument = %p -> %p
\n
"
,
args
,
ARG_FROM_OFFSET
(
args
,
0
));
/* 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
)
...
...
@@ -456,9 +459,9 @@ LONG_PTR WINAPIV NdrClientCall2(PMIDL_STUB_DESC pStubDesc, PFORMAT_STRING pForma
TRACE
(
"Explicit primitive handle @ %d
\n
"
,
pDesc
->
offset
);
if
(
pDesc
->
flag
)
/* pointer to binding */
hBinding
=
**
(
handle_t
**
)
ARG_FROM_OFFSET
(
args
,
pDesc
->
offset
);
hBinding
=
**
(
handle_t
**
)
ARG_FROM_OFFSET
(
stubMsg
,
pDesc
->
offset
);
else
hBinding
=
*
(
handle_t
*
)
ARG_FROM_OFFSET
(
args
,
pDesc
->
offset
);
hBinding
=
*
(
handle_t
*
)
ARG_FROM_OFFSET
(
stubMsg
,
pDesc
->
offset
);
current_offset
+=
sizeof
(
NDR_EHD_PRIMITIVE
);
break
;
}
...
...
@@ -475,10 +478,10 @@ LONG_PTR WINAPIV NdrClientCall2(PMIDL_STUB_DESC pStubDesc, PFORMAT_STRING pForma
if
(
pDesc
->
flags
&
HANDLE_PARAM_IS_VIA_PTR
)
{
TRACE
(
"
\t
HANDLE_PARAM_IS_VIA_PTR
\n
"
);
context_handle
=
**
(
NDR_CCONTEXT
**
)
ARG_FROM_OFFSET
(
args
,
pDesc
->
offset
);
context_handle
=
**
(
NDR_CCONTEXT
**
)
ARG_FROM_OFFSET
(
stubMsg
,
pDesc
->
offset
);
}
else
context_handle
=
*
(
NDR_CCONTEXT
*
)
ARG_FROM_OFFSET
(
args
,
pDesc
->
offset
);
context_handle
=
*
(
NDR_CCONTEXT
*
)
ARG_FROM_OFFSET
(
stubMsg
,
pDesc
->
offset
);
if
((
pDesc
->
flags
&
NDR_CONTEXT_HANDLE_CANNOT_BE_NULL
)
&&
!
context_handle
)
{
...
...
@@ -547,7 +550,7 @@ LONG_PTR WINAPIV NdrClientCall2(PMIDL_STUB_DESC pStubDesc, PFORMAT_STRING pForma
if
(
pProcHeader
->
Oi_flags
&
RPC_FC_PROC_OIF_OBJECT
)
{
/* object is always the first argument */
This
=
*
(
void
**
)
ARG_FROM_OFFSET
(
args
,
0
);
This
=
*
(
void
**
)
ARG_FROM_OFFSET
(
stubMsg
,
0
);
NdrProxyInitialize
(
This
,
&
rpcMsg
,
&
stubMsg
,
pStubDesc
,
procedure_number
);
}
else
...
...
@@ -562,8 +565,6 @@ LONG_PTR WINAPIV NdrClientCall2(PMIDL_STUB_DESC pStubDesc, PFORMAT_STRING pForma
#endif
stubMsg
.
BufferLength
=
0
;
/* needed for conformance of top-level objects */
stubMsg
.
StackTop
=
*
(
unsigned
char
**
)
args
;
/* store the RPC flags away */
if
(
pProcHeader
->
Oi_flags
&
RPC_FC_PROC_OIF_RPCFLAGS
)
...
...
@@ -665,7 +666,7 @@ LONG_PTR WINAPIV NdrClientCall2(PMIDL_STUB_DESC pStubDesc, PFORMAT_STRING pForma
unsigned
char
*
pArg
;
current_stack_offset
=
pParam
->
stack_offset
;
pArg
=
ARG_FROM_OFFSET
(
args
,
current_stack_offset
);
pArg
=
ARG_FROM_OFFSET
(
stubMsg
,
current_stack_offset
);
TRACE
(
"param[%d]: new format
\n
"
,
i
);
TRACE
(
"
\t
param_attributes:"
);
dump_RPC_FC_PROC_PF
(
pParam
->
param_attributes
);
TRACE
(
"
\n
"
);
...
...
@@ -771,7 +772,7 @@ LONG_PTR WINAPIV NdrClientCall2(PMIDL_STUB_DESC pStubDesc, PFORMAT_STRING pForma
{
NDR_PARAM_OI_BASETYPE
*
pParam
=
(
NDR_PARAM_OI_BASETYPE
*
)
&
pFormat
[
current_offset
];
unsigned
char
*
pArg
=
ARG_FROM_OFFSET
(
args
,
current_stack_offset
);
unsigned
char
*
pArg
=
ARG_FROM_OFFSET
(
stubMsg
,
current_stack_offset
);
/* no more parameters; exit loop */
if
(
current_stack_offset
>
stack_size
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment