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
d240fdff
Commit
d240fdff
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 MesBufferHandleReset().
parent
cc95915a
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
59 additions
and
2 deletions
+59
-2
ndr_es.c
dlls/rpcrt4/ndr_es.c
+34
-0
rpcrt4.spec
dlls/rpcrt4/rpcrt4.spec
+1
-1
ndr_marshall.c
dlls/rpcrt4/tests/ndr_marshall.c
+22
-0
midles.h
include/midles.h
+2
-1
No files found.
dlls/rpcrt4/ndr_es.c
View file @
d240fdff
...
...
@@ -124,6 +124,40 @@ RPC_STATUS WINAPI MesIncrementalHandleReset(
}
/***********************************************************************
* MesBufferHandleReset [RPCRT4.@]
*/
RPC_STATUS
WINAPI
MesBufferHandleReset
(
handle_t
Handle
,
ULONG
HandleStyle
,
MIDL_ES_CODE
Operation
,
char
**
Buffer
,
ULONG
BufferSize
,
ULONG
*
EncodedSize
)
{
MIDL_ES_MESSAGE
*
pEsMsg
=
(
MIDL_ES_MESSAGE
*
)
Handle
;
TRACE
(
"(%p, %u, %d, %p, %u, %p)
\n
"
,
Handle
,
HandleStyle
,
Operation
,
Buffer
,
BufferSize
,
EncodedSize
);
if
(
!
Handle
||
!
Buffer
||
!
EncodedSize
)
return
RPC_S_INVALID_ARG
;
if
(
Operation
!=
MES_ENCODE
&&
Operation
!=
MES_DECODE
&&
Operation
!=
MES_ENCODE_NDR64
)
return
RPC_S_INVALID_ARG
;
if
(
HandleStyle
!=
MES_FIXED_BUFFER_HANDLE
&&
HandleStyle
!=
MES_DYNAMIC_BUFFER_HANDLE
)
return
RPC_S_INVALID_ARG
;
init_MIDL_ES_MESSAGE
(
pEsMsg
);
pEsMsg
->
Operation
=
Operation
;
pEsMsg
->
HandleStyle
=
HandleStyle
;
if
(
HandleStyle
==
MES_FIXED_BUFFER_HANDLE
)
pEsMsg
->
Buffer
=
(
unsigned
char
*
)
*
Buffer
;
else
pEsMsg
->
pDynBuffer
=
(
unsigned
char
**
)
Buffer
;
pEsMsg
->
BufferSize
=
BufferSize
;
pEsMsg
->
pEncodedSize
=
EncodedSize
;
return
RPC_S_OK
;
}
/***********************************************************************
* MesHandleFree [RPCRT4.@]
*/
RPC_STATUS
WINAPI
MesHandleFree
(
handle_t
Handle
)
...
...
dlls/rpcrt4/rpcrt4.spec
View file @
d240fdff
...
...
@@ -96,7 +96,7 @@
@ stub I_UuidCreate
@ stub MIDL_wchar_strcpy
@ stub MIDL_wchar_strlen
@ st
ub MesBufferHandleReset
@ st
dcall MesBufferHandleReset(ptr long long ptr long ptr)
@ stdcall MesDecodeBufferHandleCreate(ptr long ptr)
@ stdcall MesDecodeIncrementalHandleCreate(ptr ptr ptr)
@ stdcall MesEncodeDynBufferHandleCreate(ptr ptr ptr)
...
...
dlls/rpcrt4/tests/ndr_marshall.c
View file @
d240fdff
...
...
@@ -2437,6 +2437,28 @@ if (status == RPC_S_OK)
status
=
MesEncodeFixedBufferHandleCreate
(
buffer
,
32
,
&
encoded_size
,
&
handle
);
ok
(
status
==
RPC_S_OK
,
"got %d
\n
"
,
status
);
status
=
MesBufferHandleReset
(
NULL
,
MES_DYNAMIC_BUFFER_HANDLE
,
MES_ENCODE
,
&
buffer
,
32
,
&
encoded_size
);
ok
(
status
==
RPC_S_INVALID_ARG
,
"got %d
\n
"
,
status
);
/* convert to dynamic buffer handle */
status
=
MesBufferHandleReset
(
handle
,
MES_DYNAMIC_BUFFER_HANDLE
,
MES_ENCODE
,
&
buffer
,
32
,
&
encoded_size
);
ok
(
status
==
RPC_S_OK
,
"got %d
\n
"
,
status
);
status
=
MesBufferHandleReset
(
handle
,
MES_DYNAMIC_BUFFER_HANDLE
,
MES_ENCODE
,
NULL
,
32
,
&
encoded_size
);
ok
(
status
==
RPC_S_INVALID_ARG
,
"got %d
\n
"
,
status
);
status
=
MesBufferHandleReset
(
handle
,
MES_DYNAMIC_BUFFER_HANDLE
,
MES_ENCODE
,
&
buffer
,
32
,
NULL
);
ok
(
status
==
RPC_S_INVALID_ARG
,
"got %d
\n
"
,
status
);
/* invalid handle type */
status
=
MesBufferHandleReset
(
handle
,
MES_DYNAMIC_BUFFER_HANDLE
+
1
,
MES_ENCODE
,
&
buffer
,
32
,
&
encoded_size
);
ok
(
status
==
RPC_S_INVALID_ARG
,
"got %d
\n
"
,
status
);
status
=
MesHandleFree
(
handle
);
ok
(
status
==
RPC_S_OK
,
"got %d
\n
"
,
status
);
}
...
...
include/midles.h
View file @
d240fdff
...
...
@@ -30,7 +30,8 @@ extern "C" {
typedef
enum
{
MES_ENCODE
,
MES_DECODE
MES_DECODE
,
MES_ENCODE_NDR64
}
MIDL_ES_CODE
;
typedef
enum
...
...
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