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
7f15d9bc
Commit
7f15d9bc
authored
Jan 31, 2006
by
Robert Shearman
Committed by
Alexandre Julliard
Jan 31, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rpcrt4: Handle the RPC_FC_PROC_BYVAL flag correctly in stubless
proxies and stubs.
parent
41971407
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
4 deletions
+35
-4
ndr_stubless.c
dlls/rpcrt4/ndr_stubless.c
+35
-4
No files found.
dlls/rpcrt4/ndr_stubless.c
View file @
7f15d9bc
...
...
@@ -780,11 +780,21 @@ LONG_PTR WINAPIV NdrClientCall2(PMIDL_STUB_DESC pStubDesc, PFORMAT_STRING pForma
{
case
PROXY_CALCSIZE
:
if
(
pParam
->
param_attributes
&
RPC_FC_PROC_PF_IN
)
{
if
(
pParam
->
param_attributes
&
RPC_FC_PROC_PF_BYVAL
)
call_buffer_sizer
(
&
stubMsg
,
pArg
,
pTypeFormat
);
else
call_buffer_sizer
(
&
stubMsg
,
*
(
unsigned
char
**
)
pArg
,
pTypeFormat
);
}
break
;
case
PROXY_MARSHAL
:
if
(
pParam
->
param_attributes
&
RPC_FC_PROC_PF_IN
)
{
if
(
pParam
->
param_attributes
&
RPC_FC_PROC_PF_BYVAL
)
call_marshaller
(
&
stubMsg
,
pArg
,
pTypeFormat
);
else
call_marshaller
(
&
stubMsg
,
*
(
unsigned
char
**
)
pArg
,
pTypeFormat
);
}
break
;
case
PROXY_UNMARSHAL
:
if
(
pParam
->
param_attributes
&
RPC_FC_PROC_PF_OUT
)
...
...
@@ -792,6 +802,8 @@ LONG_PTR WINAPIV NdrClientCall2(PMIDL_STUB_DESC pStubDesc, PFORMAT_STRING pForma
unsigned
char
*
pRetVal
=
(
unsigned
char
*
)
&
RetVal
;
if
(
pParam
->
param_attributes
&
RPC_FC_PROC_PF_RETURN
)
call_unmarshaller
(
&
stubMsg
,
&
pRetVal
,
pTypeFormat
,
0
);
else
if
(
pParam
->
param_attributes
&
RPC_FC_PROC_PF_BYVAL
)
call_unmarshaller
(
&
stubMsg
,
&
pArg
,
pTypeFormat
,
0
);
else
call_unmarshaller
(
&
stubMsg
,
(
unsigned
char
**
)
pArg
,
pTypeFormat
,
0
);
}
...
...
@@ -1192,6 +1204,11 @@ long WINAPI NdrStubCall2(
pServerInfo
->
ThunkTable
[
pRpcMsg
->
ProcNum
](
&
stubMsg
);
/* FIXME: RetVal is stored as the last argument - retrieve it */
}
else
if
(
pProcHeader
->
Oi_flags
&
RPC_FC_PROC_OIF_OBJECT
)
{
SERVER_ROUTINE
*
vtbl
=
*
(
SERVER_ROUTINE
**
)((
CStdStubBuffer
*
)
pThis
)
->
pvServerObject
;
RetVal
=
call_server_func
(
vtbl
[
pRpcMsg
->
ProcNum
],
args
,
stack_size
);
}
else
RetVal
=
call_server_func
(
pServerInfo
->
DispatchTable
[
pRpcMsg
->
ProcNum
],
args
,
stack_size
);
...
...
@@ -1311,16 +1328,26 @@ long WINAPI NdrStubCall2(
call_marshaller
(
&
stubMsg
,
(
unsigned
char
*
)
&
RetVal
,
pTypeFormat
);
else
if
(
pParam
->
param_attributes
&
RPC_FC_PROC_PF_OUT
)
{
/* we have to dereference the pointer again for complex types */
if
(
pParam
->
param_attributes
&
RPC_FC_PROC_PF_BYVAL
)
call_marshaller
(
&
stubMsg
,
pArg
,
pTypeFormat
);
else
{
call_marshaller
(
&
stubMsg
,
*
(
unsigned
char
**
)
pArg
,
pTypeFormat
);
stubMsg
.
pfnFree
(
*
(
void
**
)
pArg
);
}
/* FIXME: call call_freer here */
}
/* FIXME: call call_freer here for IN types */
break
;
case
STUBLESS_UNMARSHAL
:
if
(
pParam
->
param_attributes
&
RPC_FC_PROC_PF_IN
)
{
if
(
pParam
->
param_attributes
&
RPC_FC_PROC_PF_BYVAL
)
call_unmarshaller
(
&
stubMsg
,
&
pArg
,
pTypeFormat
,
0
);
else
call_unmarshaller
(
&
stubMsg
,
(
unsigned
char
**
)
pArg
,
pTypeFormat
,
0
);
else
if
(
pParam
->
param_attributes
&
RPC_FC_PROC_PF_OUT
)
}
else
if
((
pParam
->
param_attributes
&
RPC_FC_PROC_PF_OUT
)
&&
!
(
pParam
->
param_attributes
&
RPC_FC_PROC_PF_BYVAL
))
{
*
(
void
**
)
pArg
=
NdrAllocate
(
&
stubMsg
,
sizeof
(
void
*
));
**
(
void
***
)
pArg
=
0
;
...
...
@@ -1330,8 +1357,12 @@ long WINAPI NdrStubCall2(
if
(
pParam
->
param_attributes
&
RPC_FC_PROC_PF_RETURN
)
call_buffer_sizer
(
&
stubMsg
,
(
unsigned
char
*
)
&
RetVal
,
pTypeFormat
);
else
if
(
pParam
->
param_attributes
&
RPC_FC_PROC_PF_OUT
)
/* we have to dereference the pointer again for complex types */
{
if
(
pParam
->
param_attributes
&
RPC_FC_PROC_PF_BYVAL
)
call_buffer_sizer
(
&
stubMsg
,
pArg
,
pTypeFormat
);
else
call_buffer_sizer
(
&
stubMsg
,
*
(
unsigned
char
**
)
pArg
,
pTypeFormat
);
}
break
;
default:
RpcRaiseException
(
RPC_S_INTERNAL_ERROR
);
...
...
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