Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
766d8a17
Commit
766d8a17
authored
Dec 09, 2007
by
Rob Shearman
Committed by
Alexandre Julliard
Dec 10, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rpcrt4: Pass the USER_MARSHAL_CB structure into user marshal routines.
parent
80b8743a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
11 deletions
+31
-11
ndr_marshall.c
dlls/rpcrt4/ndr_marshall.c
+31
-11
No files found.
dlls/rpcrt4/ndr_marshall.c
View file @
766d8a17
...
...
@@ -3201,10 +3201,18 @@ void WINAPI NdrComplexArrayFree(PMIDL_STUB_MESSAGE pStubMsg,
pMemory
=
ComplexFree
(
pStubMsg
,
pMemory
,
pFormat
,
NULL
);
}
static
ULONG
UserMarshalFlags
(
const
MIDL_STUB_MESSAGE
*
pStubMsg
)
static
void
UserMarshalCB
(
PMIDL_STUB_MESSAGE
pStubMsg
,
USER_MARSHAL_CB_TYPE
cbtype
,
PFORMAT_STRING
pFormat
,
USER_MARSHAL_CB
*
umcb
)
{
return
MAKELONG
(
pStubMsg
->
dwDestContext
,
pStubMsg
->
RpcMsg
->
DataRepresentation
);
umcb
->
Flags
=
MAKELONG
(
pStubMsg
->
dwDestContext
,
pStubMsg
->
RpcMsg
->
DataRepresentation
);
umcb
->
pStubMsg
=
pStubMsg
;
umcb
->
pReserve
=
NULL
;
umcb
->
Signature
=
USER_MARSHAL_CB_SIGNATURE
;
umcb
->
CBType
=
cbtype
;
umcb
->
pFormat
=
pFormat
;
umcb
->
pTypeFormat
=
NULL
/* FIXME */
;
}
#define USER_MARSHAL_PTR_PREFIX \
...
...
@@ -3221,10 +3229,13 @@ unsigned char * WINAPI NdrUserMarshalMarshall(PMIDL_STUB_MESSAGE pStubMsg,
unsigned
flags
=
pFormat
[
1
];
unsigned
index
=
*
(
const
WORD
*
)
&
pFormat
[
2
];
unsigned
char
*
saved_buffer
=
NULL
;
ULONG
uflag
=
UserMarshalFlags
(
pStubMsg
);
USER_MARSHAL_CB
umcb
;
TRACE
(
"(%p,%p,%p)
\n
"
,
pStubMsg
,
pMemory
,
pFormat
);
TRACE
(
"index=%d
\n
"
,
index
);
UserMarshalCB
(
pStubMsg
,
USER_MARSHAL_CB_MARSHALL
,
pFormat
,
&
umcb
);
if
(
flags
&
USER_MARSHAL_POINTER
)
{
ALIGN_POINTER
(
pStubMsg
->
Buffer
,
4
);
...
...
@@ -3243,7 +3254,7 @@ unsigned char * WINAPI NdrUserMarshalMarshall(PMIDL_STUB_MESSAGE pStubMsg,
pStubMsg
->
Buffer
=
pStubMsg
->
StubDesc
->
aUserMarshalQuadruple
[
index
].
pfnMarshall
(
&
u
flag
,
pStubMsg
->
Buffer
,
pMemory
);
&
u
mcb
.
Flags
,
pStubMsg
->
Buffer
,
pMemory
);
if
(
saved_buffer
)
{
...
...
@@ -3269,10 +3280,13 @@ unsigned char * WINAPI NdrUserMarshalUnmarshall(PMIDL_STUB_MESSAGE pStubMsg,
unsigned
index
=
*
(
const
WORD
*
)
&
pFormat
[
2
];
DWORD
memsize
=
*
(
const
WORD
*
)
&
pFormat
[
4
];
unsigned
char
*
saved_buffer
=
NULL
;
ULONG
uflag
=
UserMarshalFlags
(
pStubMsg
);
USER_MARSHAL_CB
umcb
;
TRACE
(
"(%p,%p,%p,%d)
\n
"
,
pStubMsg
,
ppMemory
,
pFormat
,
fMustAlloc
);
TRACE
(
"index=%d
\n
"
,
index
);
UserMarshalCB
(
pStubMsg
,
USER_MARSHAL_CB_UNMARSHALL
,
pFormat
,
&
umcb
);
if
(
flags
&
USER_MARSHAL_POINTER
)
{
ALIGN_POINTER
(
pStubMsg
->
Buffer
,
4
);
...
...
@@ -3294,7 +3308,7 @@ unsigned char * WINAPI NdrUserMarshalUnmarshall(PMIDL_STUB_MESSAGE pStubMsg,
pStubMsg
->
Buffer
=
pStubMsg
->
StubDesc
->
aUserMarshalQuadruple
[
index
].
pfnUnmarshall
(
&
u
flag
,
pStubMsg
->
Buffer
,
*
ppMemory
);
&
u
mcb
.
Flags
,
pStubMsg
->
Buffer
,
*
ppMemory
);
if
(
saved_buffer
)
{
...
...
@@ -3316,11 +3330,14 @@ void WINAPI NdrUserMarshalBufferSize(PMIDL_STUB_MESSAGE pStubMsg,
unsigned
flags
=
pFormat
[
1
];
unsigned
index
=
*
(
const
WORD
*
)
&
pFormat
[
2
];
DWORD
bufsize
=
*
(
const
WORD
*
)
&
pFormat
[
6
];
U
LONG
uflag
=
UserMarshalFlags
(
pStubMsg
)
;
U
SER_MARSHAL_CB
umcb
;
unsigned
long
saved_buffer_length
=
0
;
TRACE
(
"(%p,%p,%p)
\n
"
,
pStubMsg
,
pMemory
,
pFormat
);
TRACE
(
"index=%d
\n
"
,
index
);
UserMarshalCB
(
pStubMsg
,
USER_MARSHAL_CB_BUFFER_SIZE
,
pFormat
,
&
umcb
);
if
(
flags
&
USER_MARSHAL_POINTER
)
{
ALIGN_LENGTH
(
pStubMsg
->
BufferLength
,
4
);
...
...
@@ -3346,7 +3363,7 @@ void WINAPI NdrUserMarshalBufferSize(PMIDL_STUB_MESSAGE pStubMsg,
else
pStubMsg
->
BufferLength
=
pStubMsg
->
StubDesc
->
aUserMarshalQuadruple
[
index
].
pfnBufferSize
(
&
u
flag
,
pStubMsg
->
BufferLength
,
pMemory
);
&
u
mcb
.
Flags
,
pStubMsg
->
BufferLength
,
pMemory
);
if
(
saved_buffer_length
)
{
...
...
@@ -3401,12 +3418,15 @@ void WINAPI NdrUserMarshalFree(PMIDL_STUB_MESSAGE pStubMsg,
{
/* unsigned flags = pFormat[1]; */
unsigned
index
=
*
(
const
WORD
*
)
&
pFormat
[
2
];
ULONG
uflag
=
UserMarshalFlags
(
pStubMsg
);
USER_MARSHAL_CB
umcb
;
TRACE
(
"(%p,%p,%p)
\n
"
,
pStubMsg
,
pMemory
,
pFormat
);
TRACE
(
"index=%d
\n
"
,
index
);
UserMarshalCB
(
pStubMsg
,
USER_MARSHAL_CB_FREE
,
pFormat
,
&
umcb
);
pStubMsg
->
StubDesc
->
aUserMarshalQuadruple
[
index
].
pfnFree
(
&
u
flag
,
pMemory
);
&
u
mcb
.
Flags
,
pMemory
);
}
/***********************************************************************
...
...
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