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
fc124eca
Commit
fc124eca
authored
Jun 25, 2007
by
Rob Shearman
Committed by
Alexandre Julliard
Jun 25, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rpcrt4: Implement marshalling, unmarshalling and buffer sizing for the context handle type.
parent
d36f02ea
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
71 additions
and
3 deletions
+71
-3
ndr_marshall.c
dlls/rpcrt4/ndr_marshall.c
+71
-3
No files found.
dlls/rpcrt4/ndr_marshall.c
View file @
fc124eca
...
...
@@ -118,6 +118,10 @@ static void WINAPI NdrBaseTypeBufferSize(PMIDL_STUB_MESSAGE, unsigned char *, PF
static
void
WINAPI
NdrBaseTypeFree
(
PMIDL_STUB_MESSAGE
,
unsigned
char
*
,
PFORMAT_STRING
);
static
ULONG
WINAPI
NdrBaseTypeMemorySize
(
PMIDL_STUB_MESSAGE
,
PFORMAT_STRING
);
static
unsigned
char
*
WINAPI
NdrContextHandleMarshall
(
PMIDL_STUB_MESSAGE
,
unsigned
char
*
,
PFORMAT_STRING
);
static
void
WINAPI
NdrContextHandleBufferSize
(
PMIDL_STUB_MESSAGE
,
unsigned
char
*
,
PFORMAT_STRING
);
static
unsigned
char
*
WINAPI
NdrContextHandleUnmarshall
(
PMIDL_STUB_MESSAGE
,
unsigned
char
**
,
PFORMAT_STRING
,
unsigned
char
);
const
NDR_MARSHALL
NdrMarshaller
[
NDR_TABLE_SIZE
]
=
{
0
,
NdrBaseTypeMarshall
,
NdrBaseTypeMarshall
,
NdrBaseTypeMarshall
,
...
...
@@ -152,7 +156,7 @@ const NDR_MARSHALL NdrMarshaller[NDR_TABLE_SIZE] = {
/* 0x2f */
NdrInterfacePointerMarshall
,
/* 0x30 */
0
,
NdrContextHandleMarshall
,
/* 0xb1 */
0
,
0
,
0
,
NdrUserMarshalMarshall
,
...
...
@@ -194,7 +198,7 @@ const NDR_UNMARSHALL NdrUnmarshaller[NDR_TABLE_SIZE] = {
/* 0x2f */
NdrInterfacePointerUnmarshall
,
/* 0x30 */
0
,
NdrContextHandleUnmarshall
,
/* 0xb1 */
0
,
0
,
0
,
NdrUserMarshalUnmarshall
,
...
...
@@ -236,7 +240,7 @@ const NDR_BUFFERSIZE NdrBufferSizer[NDR_TABLE_SIZE] = {
/* 0x2f */
NdrInterfacePointerBufferSize
,
/* 0x30 */
0
,
NdrContextHandleBufferSize
,
/* 0xb1 */
0
,
0
,
0
,
NdrUserMarshalBufferSize
,
...
...
@@ -5517,6 +5521,70 @@ static void WINAPI NdrBaseTypeFree(PMIDL_STUB_MESSAGE pStubMsg,
}
/***********************************************************************
* NdrContextHandleBufferSize [internal]
*/
static
void
WINAPI
NdrContextHandleBufferSize
(
PMIDL_STUB_MESSAGE
pStubMsg
,
unsigned
char
*
pMemory
,
PFORMAT_STRING
pFormat
)
{
TRACE
(
"pStubMsg %p, pMemory %p, type 0x%02x
\n
"
,
pStubMsg
,
pMemory
,
*
pFormat
);
if
(
*
pFormat
!=
RPC_FC_BIND_CONTEXT
)
{
ERR
(
"invalid format type %x
\n
"
,
*
pFormat
);
RpcRaiseException
(
RPC_S_INTERNAL_ERROR
);
}
ALIGN_LENGTH
(
pStubMsg
->
BufferLength
,
4
);
pStubMsg
->
BufferLength
+=
cbNDRContext
;
}
/***********************************************************************
* NdrContextHandleMarshall [internal]
*/
static
unsigned
char
*
WINAPI
NdrContextHandleMarshall
(
PMIDL_STUB_MESSAGE
pStubMsg
,
unsigned
char
*
pMemory
,
PFORMAT_STRING
pFormat
)
{
TRACE
(
"pStubMsg %p, pMemory %p, type 0x%02x
\n
"
,
pStubMsg
,
pMemory
,
*
pFormat
);
if
(
*
pFormat
!=
RPC_FC_BIND_CONTEXT
)
{
ERR
(
"invalid format type %x
\n
"
,
*
pFormat
);
RpcRaiseException
(
RPC_S_INTERNAL_ERROR
);
}
if
(
pFormat
[
1
]
&
0x80
)
NdrClientContextMarshall
(
pStubMsg
,
*
(
NDR_CCONTEXT
**
)
pMemory
,
FALSE
);
else
NdrClientContextMarshall
(
pStubMsg
,
(
NDR_CCONTEXT
*
)
pMemory
,
FALSE
);
return
NULL
;
}
/***********************************************************************
* NdrContextHandleUnmarshall [internal]
*/
static
unsigned
char
*
WINAPI
NdrContextHandleUnmarshall
(
PMIDL_STUB_MESSAGE
pStubMsg
,
unsigned
char
**
ppMemory
,
PFORMAT_STRING
pFormat
,
unsigned
char
fMustAlloc
)
{
if
(
*
pFormat
!=
RPC_FC_BIND_CONTEXT
)
{
ERR
(
"invalid format type %x
\n
"
,
*
pFormat
);
RpcRaiseException
(
RPC_S_INTERNAL_ERROR
);
}
**
(
NDR_CCONTEXT
**
)
ppMemory
=
NULL
;
NdrClientContextUnmarshall
(
pStubMsg
,
*
(
NDR_CCONTEXT
**
)
ppMemory
,
pStubMsg
->
RpcMsg
->
Handle
);
return
NULL
;
}
/***********************************************************************
* NdrClientContextMarshall [RPCRT4.@]
*/
void
WINAPI
NdrClientContextMarshall
(
PMIDL_STUB_MESSAGE
pStubMsg
,
...
...
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