Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Zsolt Vadász
wine
Commits
a2767e8d
Commit
a2767e8d
authored
18 years ago
by
Robert Shearman
Committed by
Alexandre Julliard
18 years ago
Browse files
Options
Downloads
Patches
Plain Diff
rpcrt4: Use macros to generate the code for unmarshaling base types.
parent
19fad8e7
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dlls/rpcrt4/ndr_marshall.c
+12
-17
12 additions, 17 deletions
dlls/rpcrt4/ndr_marshall.c
with
12 additions
and
17 deletions
dlls/rpcrt4/ndr_marshall.c
+
12
−
17
View file @
a2767e8d
...
...
@@ -4106,49 +4106,43 @@ static unsigned char *WINAPI NdrBaseTypeUnmarshall(
TRACE
(
"*ppMemory: %p
\n
"
,
*
ppMemory
);
#define BASE_TYPE_UNMARSHALL(type) \
ALIGN_POINTER(pStubMsg->Buffer, sizeof(type)); \
**(type **)ppMemory = *(type *)pStubMsg->Buffer; \
pStubMsg->Buffer += sizeof(type);
switch
(
*
pFormat
)
{
case
RPC_FC_BYTE
:
case
RPC_FC_CHAR
:
case
RPC_FC_SMALL
:
case
RPC_FC_USMALL
:
**
(
UCHAR
**
)
ppMemory
=
*
(
UCHAR
*
)
pStubMsg
->
Buffer
;
pStubMsg
->
Buffer
+=
sizeof
(
UCHAR
);
BASE_TYPE_UNMARSHALL
(
UCHAR
);
TRACE
(
"value: 0x%02x
\n
"
,
**
(
UCHAR
**
)
ppMemory
);
break
;
case
RPC_FC_WCHAR
:
case
RPC_FC_SHORT
:
case
RPC_FC_USHORT
:
ALIGN_POINTER
(
pStubMsg
->
Buffer
,
sizeof
(
USHORT
));
**
(
USHORT
**
)
ppMemory
=
*
(
USHORT
*
)
pStubMsg
->
Buffer
;
pStubMsg
->
Buffer
+=
sizeof
(
USHORT
);
BASE_TYPE_UNMARSHALL
(
USHORT
);
TRACE
(
"value: 0x%04x
\n
"
,
**
(
USHORT
**
)
ppMemory
);
break
;
case
RPC_FC_LONG
:
case
RPC_FC_ULONG
:
case
RPC_FC_ERROR_STATUS_T
:
case
RPC_FC_ENUM32
:
ALIGN_POINTER
(
pStubMsg
->
Buffer
,
sizeof
(
ULONG
));
**
(
ULONG
**
)
ppMemory
=
*
(
ULONG
*
)
pStubMsg
->
Buffer
;
pStubMsg
->
Buffer
+=
sizeof
(
ULONG
);
BASE_TYPE_UNMARSHALL
(
ULONG
);
TRACE
(
"value: 0x%08lx
\n
"
,
**
(
ULONG
**
)
ppMemory
);
break
;
case
RPC_FC_FLOAT
:
ALIGN_POINTER
(
pStubMsg
->
Buffer
,
sizeof
(
float
));
**
(
float
**
)
ppMemory
=
*
(
float
*
)
pStubMsg
->
Buffer
;
pStubMsg
->
Buffer
+=
sizeof
(
float
);
BASE_TYPE_UNMARSHALL
(
float
);
TRACE
(
"value: %f
\n
"
,
**
(
float
**
)
ppMemory
);
break
;
case
RPC_FC_DOUBLE
:
ALIGN_POINTER
(
pStubMsg
->
Buffer
,
sizeof
(
double
));
**
(
double
**
)
ppMemory
=
*
(
double
*
)
pStubMsg
->
Buffer
;
pStubMsg
->
Buffer
+=
sizeof
(
double
);
BASE_TYPE_UNMARSHALL
(
double
);
TRACE
(
"value: %f
\n
"
,
**
(
double
**
)
ppMemory
);
break
;
case
RPC_FC_HYPER
:
ALIGN_POINTER
(
pStubMsg
->
Buffer
,
sizeof
(
ULONGLONG
));
**
(
ULONGLONG
**
)
ppMemory
=
*
(
ULONGLONG
*
)
pStubMsg
->
Buffer
;
pStubMsg
->
Buffer
+=
sizeof
(
ULONGLONG
);
BASE_TYPE_UNMARSHALL
(
ULONGLONG
);
TRACE
(
"value: %s
\n
"
,
wine_dbgstr_longlong
(
**
(
ULONGLONG
**
)
ppMemory
));
break
;
case
RPC_FC_ENUM16
:
...
...
@@ -4161,6 +4155,7 @@ static unsigned char *WINAPI NdrBaseTypeUnmarshall(
default:
FIXME
(
"Unhandled base type: 0x%02x
\n
"
,
*
pFormat
);
}
#undef BASE_TYPE_UNMARSHALL
/* FIXME: what is the correct return value? */
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment