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
36bc8563
Commit
36bc8563
authored
Mar 03, 2015
by
Nikolay Sivov
Committed by
Alexandre Julliard
Mar 04, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rpcrt4: Implement MesEncodeDynBufferHandleCreate().
parent
d240fdff
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
39 additions
and
7 deletions
+39
-7
ndr_es.c
dlls/rpcrt4/ndr_es.c
+39
-7
No files found.
dlls/rpcrt4/ndr_es.c
View file @
36bc8563
...
...
@@ -167,6 +167,17 @@ RPC_STATUS WINAPI MesHandleFree(handle_t Handle)
return
RPC_S_OK
;
}
static
RPC_STATUS
validate_mes_buffer_pointer
(
const
char
*
Buffer
)
{
if
(
!
Buffer
)
return
RPC_S_INVALID_ARG
;
if
(((
ULONG_PTR
)
Buffer
&
7
)
!=
0
)
return
RPC_X_INVALID_BUFFER
;
return
RPC_S_OK
;
}
/***********************************************************************
* MesEncodeFixedBufferHandleCreate [RPCRT4.@]
*/
...
...
@@ -174,14 +185,12 @@ RPC_STATUS RPC_ENTRY MesEncodeFixedBufferHandleCreate(
char
*
Buffer
,
ULONG
BufferSize
,
ULONG
*
pEncodedSize
,
handle_t
*
pHandle
)
{
MIDL_ES_MESSAGE
*
pEsMsg
;
RPC_STATUS
status
;
TRACE
(
"(%p, %d, %p, %p)
\n
"
,
Buffer
,
BufferSize
,
pEncodedSize
,
pHandle
);
if
(
!
Buffer
)
return
RPC_S_INVALID_ARG
;
if
(((
ULONG_PTR
)
Buffer
%
8
)
!=
0
)
return
RPC_X_INVALID_BUFFER
;
if
((
status
=
validate_mes_buffer_pointer
(
Buffer
)))
return
status
;
if
(
!
pEncodedSize
)
return
RPC_S_INVALID_ARG
;
...
...
@@ -208,10 +217,29 @@ RPC_STATUS RPC_ENTRY MesEncodeFixedBufferHandleCreate(
/***********************************************************************
* MesEncodeDynBufferHandleCreate [RPCRT4.@]
*/
RPC_STATUS
RPC_ENTRY
MesEncodeDynBufferHandleCreate
(
char
**
pp
Buffer
,
RPC_STATUS
RPC_ENTRY
MesEncodeDynBufferHandleCreate
(
char
**
Buffer
,
ULONG
*
pEncodedSize
,
handle_t
*
pHandle
)
{
FIXME
(
"%p %p %p stub
\n
"
,
ppBuffer
,
pEncodedSize
,
pHandle
);
MIDL_ES_MESSAGE
*
pEsMsg
;
TRACE
(
"(%p, %p, %p)
\n
"
,
Buffer
,
pEncodedSize
,
pHandle
);
if
(
!
pEncodedSize
)
return
RPC_S_INVALID_ARG
;
pEsMsg
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
*
pEsMsg
));
if
(
!
pEsMsg
)
return
RPC_S_OUT_OF_MEMORY
;
init_MIDL_ES_MESSAGE
(
pEsMsg
);
pEsMsg
->
Operation
=
MES_ENCODE
;
pEsMsg
->
HandleStyle
=
MES_DYNAMIC_BUFFER_HANDLE
;
pEsMsg
->
pDynBuffer
=
(
unsigned
char
**
)
Buffer
;
pEsMsg
->
pEncodedSize
=
pEncodedSize
;
*
pHandle
=
(
handle_t
)
pEsMsg
;
return
RPC_S_OK
;
}
...
...
@@ -222,9 +250,13 @@ RPC_STATUS RPC_ENTRY MesDecodeBufferHandleCreate(
char
*
Buffer
,
ULONG
BufferSize
,
handle_t
*
pHandle
)
{
MIDL_ES_MESSAGE
*
pEsMsg
;
RPC_STATUS
status
;
TRACE
(
"(%p, %d, %p)
\n
"
,
Buffer
,
BufferSize
,
pHandle
);
if
((
status
=
validate_mes_buffer_pointer
(
Buffer
)))
return
status
;
pEsMsg
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
*
pEsMsg
));
if
(
!
pEsMsg
)
return
RPC_S_OUT_OF_MEMORY
;
...
...
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