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
47ed171a
Commit
47ed171a
authored
Dec 03, 2013
by
Frédéric Delanoy
Committed by
Alexandre Julliard
Dec 03, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rpcrt4: Use BOOL type where appropriate.
parent
e780ee58
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
35 deletions
+36
-35
ndr_marshall.c
dlls/rpcrt4/ndr_marshall.c
+33
-33
rpcrt4_main.c
dlls/rpcrt4/rpcrt4_main.c
+3
-2
No files found.
dlls/rpcrt4/ndr_marshall.c
View file @
47ed171a
...
@@ -807,7 +807,7 @@ static void PointerMarshall(PMIDL_STUB_MESSAGE pStubMsg,
...
@@ -807,7 +807,7 @@ static void PointerMarshall(PMIDL_STUB_MESSAGE pStubMsg,
PFORMAT_STRING
desc
;
PFORMAT_STRING
desc
;
NDR_MARSHALL
m
;
NDR_MARSHALL
m
;
ULONG
pointer_id
;
ULONG
pointer_id
;
int
pointer_needs_marshaling
;
BOOL
pointer_needs_marshaling
;
TRACE
(
"(%p,%p,%p,%p)
\n
"
,
pStubMsg
,
Buffer
,
Pointer
,
pFormat
);
TRACE
(
"(%p,%p,%p,%p)
\n
"
,
pStubMsg
,
Buffer
,
Pointer
,
pFormat
);
TRACE
(
"type=0x%x, attr="
,
type
);
dump_pointer_attr
(
attr
);
TRACE
(
"type=0x%x, attr="
,
type
);
dump_pointer_attr
(
attr
);
...
@@ -822,14 +822,14 @@ static void PointerMarshall(PMIDL_STUB_MESSAGE pStubMsg,
...
@@ -822,14 +822,14 @@ static void PointerMarshall(PMIDL_STUB_MESSAGE pStubMsg,
ERR
(
"NULL ref pointer is not allowed
\n
"
);
ERR
(
"NULL ref pointer is not allowed
\n
"
);
RpcRaiseException
(
RPC_X_NULL_REF_POINTER
);
RpcRaiseException
(
RPC_X_NULL_REF_POINTER
);
}
}
pointer_needs_marshaling
=
1
;
pointer_needs_marshaling
=
TRUE
;
break
;
break
;
case
RPC_FC_UP
:
/* unique pointer */
case
RPC_FC_UP
:
/* unique pointer */
case
RPC_FC_OP
:
/* object pointer - same as unique here */
case
RPC_FC_OP
:
/* object pointer - same as unique here */
if
(
Pointer
)
if
(
Pointer
)
pointer_needs_marshaling
=
1
;
pointer_needs_marshaling
=
TRUE
;
else
else
pointer_needs_marshaling
=
0
;
pointer_needs_marshaling
=
FALSE
;
pointer_id
=
Pointer
?
NDR_POINTER_ID
(
pStubMsg
)
:
0
;
pointer_id
=
Pointer
?
NDR_POINTER_ID
(
pStubMsg
)
:
0
;
TRACE
(
"writing 0x%08x to buffer
\n
"
,
pointer_id
);
TRACE
(
"writing 0x%08x to buffer
\n
"
,
pointer_id
);
NDR_LOCAL_UINT32_WRITE
(
Buffer
,
pointer_id
);
NDR_LOCAL_UINT32_WRITE
(
Buffer
,
pointer_id
);
...
@@ -875,7 +875,7 @@ static void PointerUnmarshall(PMIDL_STUB_MESSAGE pStubMsg,
...
@@ -875,7 +875,7 @@ static void PointerUnmarshall(PMIDL_STUB_MESSAGE pStubMsg,
PFORMAT_STRING
desc
;
PFORMAT_STRING
desc
;
NDR_UNMARSHALL
m
;
NDR_UNMARSHALL
m
;
DWORD
pointer_id
=
0
;
DWORD
pointer_id
=
0
;
int
pointer_needs_unmarshaling
;
BOOL
pointer_needs_unmarshaling
;
TRACE
(
"(%p,%p,%p,%p,%p,%d)
\n
"
,
pStubMsg
,
Buffer
,
pPointer
,
pSrcPointer
,
pFormat
,
fMustAlloc
);
TRACE
(
"(%p,%p,%p,%p,%p,%d)
\n
"
,
pStubMsg
,
Buffer
,
pPointer
,
pSrcPointer
,
pFormat
,
fMustAlloc
);
TRACE
(
"type=0x%x, attr="
,
type
);
dump_pointer_attr
(
attr
);
TRACE
(
"type=0x%x, attr="
,
type
);
dump_pointer_attr
(
attr
);
...
@@ -885,16 +885,16 @@ static void PointerUnmarshall(PMIDL_STUB_MESSAGE pStubMsg,
...
@@ -885,16 +885,16 @@ static void PointerUnmarshall(PMIDL_STUB_MESSAGE pStubMsg,
switch
(
type
)
{
switch
(
type
)
{
case
RPC_FC_RP
:
/* ref pointer (always non-null) */
case
RPC_FC_RP
:
/* ref pointer (always non-null) */
pointer_needs_unmarshaling
=
1
;
pointer_needs_unmarshaling
=
TRUE
;
break
;
break
;
case
RPC_FC_UP
:
/* unique pointer */
case
RPC_FC_UP
:
/* unique pointer */
pointer_id
=
NDR_LOCAL_UINT32_READ
(
Buffer
);
pointer_id
=
NDR_LOCAL_UINT32_READ
(
Buffer
);
TRACE
(
"pointer_id is 0x%08x
\n
"
,
pointer_id
);
TRACE
(
"pointer_id is 0x%08x
\n
"
,
pointer_id
);
if
(
pointer_id
)
if
(
pointer_id
)
pointer_needs_unmarshaling
=
1
;
pointer_needs_unmarshaling
=
TRUE
;
else
{
else
{
*
pPointer
=
NULL
;
*
pPointer
=
NULL
;
pointer_needs_unmarshaling
=
0
;
pointer_needs_unmarshaling
=
FALSE
;
}
}
break
;
break
;
case
RPC_FC_OP
:
/* object pointer - we must free data before overwriting it */
case
RPC_FC_OP
:
/* object pointer - we must free data before overwriting it */
...
@@ -906,11 +906,11 @@ static void PointerUnmarshall(PMIDL_STUB_MESSAGE pStubMsg,
...
@@ -906,11 +906,11 @@ static void PointerUnmarshall(PMIDL_STUB_MESSAGE pStubMsg,
fMustAlloc
=
TRUE
;
fMustAlloc
=
TRUE
;
}
}
if
(
pointer_id
)
if
(
pointer_id
)
pointer_needs_unmarshaling
=
1
;
pointer_needs_unmarshaling
=
TRUE
;
else
else
{
{
*
pPointer
=
NULL
;
*
pPointer
=
NULL
;
pointer_needs_unmarshaling
=
0
;
pointer_needs_unmarshaling
=
FALSE
;
}
}
break
;
break
;
case
RPC_FC_FP
:
case
RPC_FC_FP
:
...
@@ -990,7 +990,7 @@ static void PointerBufferSize(PMIDL_STUB_MESSAGE pStubMsg,
...
@@ -990,7 +990,7 @@ static void PointerBufferSize(PMIDL_STUB_MESSAGE pStubMsg,
unsigned
type
=
pFormat
[
0
],
attr
=
pFormat
[
1
];
unsigned
type
=
pFormat
[
0
],
attr
=
pFormat
[
1
];
PFORMAT_STRING
desc
;
PFORMAT_STRING
desc
;
NDR_BUFFERSIZE
m
;
NDR_BUFFERSIZE
m
;
int
pointer_needs_sizing
;
BOOL
pointer_needs_sizing
;
ULONG
pointer_id
;
ULONG
pointer_id
;
TRACE
(
"(%p,%p,%p)
\n
"
,
pStubMsg
,
Pointer
,
pFormat
);
TRACE
(
"(%p,%p,%p)
\n
"
,
pStubMsg
,
Pointer
,
pFormat
);
...
@@ -1045,7 +1045,7 @@ static ULONG PointerMemorySize(PMIDL_STUB_MESSAGE pStubMsg,
...
@@ -1045,7 +1045,7 @@ static ULONG PointerMemorySize(PMIDL_STUB_MESSAGE pStubMsg,
PFORMAT_STRING
desc
;
PFORMAT_STRING
desc
;
NDR_MEMORYSIZE
m
;
NDR_MEMORYSIZE
m
;
DWORD
pointer_id
=
0
;
DWORD
pointer_id
=
0
;
int
pointer_needs_sizing
;
BOOL
pointer_needs_sizing
;
TRACE
(
"(%p,%p,%p)
\n
"
,
pStubMsg
,
Buffer
,
pFormat
);
TRACE
(
"(%p,%p,%p)
\n
"
,
pStubMsg
,
Buffer
,
pFormat
);
TRACE
(
"type=0x%x, attr="
,
type
);
dump_pointer_attr
(
attr
);
TRACE
(
"type=0x%x, attr="
,
type
);
dump_pointer_attr
(
attr
);
...
@@ -1055,16 +1055,16 @@ static ULONG PointerMemorySize(PMIDL_STUB_MESSAGE pStubMsg,
...
@@ -1055,16 +1055,16 @@ static ULONG PointerMemorySize(PMIDL_STUB_MESSAGE pStubMsg,
switch
(
type
)
{
switch
(
type
)
{
case
RPC_FC_RP
:
/* ref pointer (always non-null) */
case
RPC_FC_RP
:
/* ref pointer (always non-null) */
pointer_needs_sizing
=
1
;
pointer_needs_sizing
=
TRUE
;
break
;
break
;
case
RPC_FC_UP
:
/* unique pointer */
case
RPC_FC_UP
:
/* unique pointer */
case
RPC_FC_OP
:
/* object pointer - we must free data before overwriting it */
case
RPC_FC_OP
:
/* object pointer - we must free data before overwriting it */
pointer_id
=
NDR_LOCAL_UINT32_READ
(
Buffer
);
pointer_id
=
NDR_LOCAL_UINT32_READ
(
Buffer
);
TRACE
(
"pointer_id is 0x%08x
\n
"
,
pointer_id
);
TRACE
(
"pointer_id is 0x%08x
\n
"
,
pointer_id
);
if
(
pointer_id
)
if
(
pointer_id
)
pointer_needs_sizing
=
1
;
pointer_needs_sizing
=
TRUE
;
else
else
pointer_needs_sizing
=
0
;
pointer_needs_sizing
=
FALSE
;
break
;
break
;
case
RPC_FC_FP
:
case
RPC_FC_FP
:
{
{
...
@@ -2892,7 +2892,7 @@ static unsigned char * ComplexMarshall(PMIDL_STUB_MESSAGE pStubMsg,
...
@@ -2892,7 +2892,7 @@ static unsigned char * ComplexMarshall(PMIDL_STUB_MESSAGE pStubMsg,
case
RPC_FC_POINTER
:
case
RPC_FC_POINTER
:
{
{
unsigned
char
*
saved_buffer
;
unsigned
char
*
saved_buffer
;
int
pointer_buffer_mark_set
=
0
;
BOOL
pointer_buffer_mark_set
=
FALSE
;
TRACE
(
"pointer=%p <= %p
\n
"
,
*
(
unsigned
char
**
)
pMemory
,
pMemory
);
TRACE
(
"pointer=%p <= %p
\n
"
,
*
(
unsigned
char
**
)
pMemory
,
pMemory
);
TRACE
(
"pStubMsg->Buffer before %p
\n
"
,
pStubMsg
->
Buffer
);
TRACE
(
"pStubMsg->Buffer before %p
\n
"
,
pStubMsg
->
Buffer
);
if
(
*
pFormat
!=
RPC_FC_POINTER
)
if
(
*
pFormat
!=
RPC_FC_POINTER
)
...
@@ -2904,7 +2904,7 @@ static unsigned char * ComplexMarshall(PMIDL_STUB_MESSAGE pStubMsg,
...
@@ -2904,7 +2904,7 @@ static unsigned char * ComplexMarshall(PMIDL_STUB_MESSAGE pStubMsg,
{
{
pStubMsg
->
Buffer
=
pStubMsg
->
PointerBufferMark
;
pStubMsg
->
Buffer
=
pStubMsg
->
PointerBufferMark
;
pStubMsg
->
PointerBufferMark
=
NULL
;
pStubMsg
->
PointerBufferMark
=
NULL
;
pointer_buffer_mark_set
=
1
;
pointer_buffer_mark_set
=
TRUE
;
}
}
else
if
(
*
pPointer
!=
RPC_FC_RP
)
else
if
(
*
pPointer
!=
RPC_FC_RP
)
safe_buffer_increment
(
pStubMsg
,
4
);
/* for pointer ID */
safe_buffer_increment
(
pStubMsg
,
4
);
/* for pointer ID */
...
@@ -3061,7 +3061,7 @@ static unsigned char * ComplexUnmarshall(PMIDL_STUB_MESSAGE pStubMsg,
...
@@ -3061,7 +3061,7 @@ static unsigned char * ComplexUnmarshall(PMIDL_STUB_MESSAGE pStubMsg,
case
RPC_FC_POINTER
:
case
RPC_FC_POINTER
:
{
{
unsigned
char
*
saved_buffer
;
unsigned
char
*
saved_buffer
;
int
pointer_buffer_mark_set
=
0
;
BOOL
pointer_buffer_mark_set
=
FALSE
;
TRACE
(
"pointer => %p
\n
"
,
pMemory
);
TRACE
(
"pointer => %p
\n
"
,
pMemory
);
if
(
*
pFormat
!=
RPC_FC_POINTER
)
if
(
*
pFormat
!=
RPC_FC_POINTER
)
pPointer
=
pFormat
;
pPointer
=
pFormat
;
...
@@ -3072,7 +3072,7 @@ static unsigned char * ComplexUnmarshall(PMIDL_STUB_MESSAGE pStubMsg,
...
@@ -3072,7 +3072,7 @@ static unsigned char * ComplexUnmarshall(PMIDL_STUB_MESSAGE pStubMsg,
{
{
pStubMsg
->
Buffer
=
pStubMsg
->
PointerBufferMark
;
pStubMsg
->
Buffer
=
pStubMsg
->
PointerBufferMark
;
pStubMsg
->
PointerBufferMark
=
NULL
;
pStubMsg
->
PointerBufferMark
=
NULL
;
pointer_buffer_mark_set
=
1
;
pointer_buffer_mark_set
=
TRUE
;
}
}
else
if
(
*
pPointer
!=
RPC_FC_RP
)
else
if
(
*
pPointer
!=
RPC_FC_RP
)
safe_buffer_increment
(
pStubMsg
,
4
);
/* for pointer ID */
safe_buffer_increment
(
pStubMsg
,
4
);
/* for pointer ID */
...
@@ -3426,7 +3426,7 @@ static ULONG ComplexStructMemorySize(PMIDL_STUB_MESSAGE pStubMsg,
...
@@ -3426,7 +3426,7 @@ static ULONG ComplexStructMemorySize(PMIDL_STUB_MESSAGE pStubMsg,
case
RPC_FC_POINTER
:
case
RPC_FC_POINTER
:
{
{
unsigned
char
*
saved_buffer
;
unsigned
char
*
saved_buffer
;
int
pointer_buffer_mark_set
=
0
;
BOOL
pointer_buffer_mark_set
=
FALSE
;
if
(
*
pFormat
!=
RPC_FC_POINTER
)
if
(
*
pFormat
!=
RPC_FC_POINTER
)
pPointer
=
pFormat
;
pPointer
=
pFormat
;
if
(
*
pPointer
!=
RPC_FC_RP
)
if
(
*
pPointer
!=
RPC_FC_RP
)
...
@@ -3436,7 +3436,7 @@ static ULONG ComplexStructMemorySize(PMIDL_STUB_MESSAGE pStubMsg,
...
@@ -3436,7 +3436,7 @@ static ULONG ComplexStructMemorySize(PMIDL_STUB_MESSAGE pStubMsg,
{
{
pStubMsg
->
Buffer
=
pStubMsg
->
PointerBufferMark
;
pStubMsg
->
Buffer
=
pStubMsg
->
PointerBufferMark
;
pStubMsg
->
PointerBufferMark
=
NULL
;
pStubMsg
->
PointerBufferMark
=
NULL
;
pointer_buffer_mark_set
=
1
;
pointer_buffer_mark_set
=
TRUE
;
}
}
else
if
(
*
pPointer
!=
RPC_FC_RP
)
else
if
(
*
pPointer
!=
RPC_FC_RP
)
safe_buffer_increment
(
pStubMsg
,
4
);
/* for pointer ID */
safe_buffer_increment
(
pStubMsg
,
4
);
/* for pointer ID */
...
@@ -3582,7 +3582,7 @@ unsigned char * WINAPI NdrComplexStructMarshall(PMIDL_STUB_MESSAGE pStubMsg,
...
@@ -3582,7 +3582,7 @@ unsigned char * WINAPI NdrComplexStructMarshall(PMIDL_STUB_MESSAGE pStubMsg,
PFORMAT_STRING
conf_array
=
NULL
;
PFORMAT_STRING
conf_array
=
NULL
;
PFORMAT_STRING
pointer_desc
=
NULL
;
PFORMAT_STRING
pointer_desc
=
NULL
;
unsigned
char
*
OldMemory
=
pStubMsg
->
Memory
;
unsigned
char
*
OldMemory
=
pStubMsg
->
Memory
;
int
pointer_buffer_mark_set
=
0
;
BOOL
pointer_buffer_mark_set
=
FALSE
;
ULONG
count
=
0
;
ULONG
count
=
0
;
ULONG
max_count
=
0
;
ULONG
max_count
=
0
;
ULONG
offset
=
0
;
ULONG
offset
=
0
;
...
@@ -3605,7 +3605,7 @@ unsigned char * WINAPI NdrComplexStructMarshall(PMIDL_STUB_MESSAGE pStubMsg,
...
@@ -3605,7 +3605,7 @@ unsigned char * WINAPI NdrComplexStructMarshall(PMIDL_STUB_MESSAGE pStubMsg,
/* save it for use by embedded pointer code later */
/* save it for use by embedded pointer code later */
pStubMsg
->
PointerBufferMark
=
(
unsigned
char
*
)
pStubMsg
->
RpcMsg
->
Buffer
+
pStubMsg
->
BufferLength
;
pStubMsg
->
PointerBufferMark
=
(
unsigned
char
*
)
pStubMsg
->
RpcMsg
->
Buffer
+
pStubMsg
->
BufferLength
;
TRACE
(
"difference = 0x%x
\n
"
,
(
ULONG
)(
pStubMsg
->
PointerBufferMark
-
pStubMsg
->
Buffer
));
TRACE
(
"difference = 0x%x
\n
"
,
(
ULONG
)(
pStubMsg
->
PointerBufferMark
-
pStubMsg
->
Buffer
));
pointer_buffer_mark_set
=
1
;
pointer_buffer_mark_set
=
TRUE
;
/* restore the original buffer length */
/* restore the original buffer length */
pStubMsg
->
BufferLength
=
saved_buffer_length
;
pStubMsg
->
BufferLength
=
saved_buffer_length
;
...
@@ -3668,7 +3668,7 @@ unsigned char * WINAPI NdrComplexStructUnmarshall(PMIDL_STUB_MESSAGE pStubMsg,
...
@@ -3668,7 +3668,7 @@ unsigned char * WINAPI NdrComplexStructUnmarshall(PMIDL_STUB_MESSAGE pStubMsg,
PFORMAT_STRING
conf_array
=
NULL
;
PFORMAT_STRING
conf_array
=
NULL
;
PFORMAT_STRING
pointer_desc
=
NULL
;
PFORMAT_STRING
pointer_desc
=
NULL
;
unsigned
char
*
pMemory
;
unsigned
char
*
pMemory
;
int
pointer_buffer_mark_set
=
0
;
BOOL
pointer_buffer_mark_set
=
FALSE
;
ULONG
count
=
0
;
ULONG
count
=
0
;
ULONG
max_count
=
0
;
ULONG
max_count
=
0
;
ULONG
offset
=
0
;
ULONG
offset
=
0
;
...
@@ -3691,7 +3691,7 @@ unsigned char * WINAPI NdrComplexStructUnmarshall(PMIDL_STUB_MESSAGE pStubMsg,
...
@@ -3691,7 +3691,7 @@ unsigned char * WINAPI NdrComplexStructUnmarshall(PMIDL_STUB_MESSAGE pStubMsg,
/* save it for use by embedded pointer code later */
/* save it for use by embedded pointer code later */
pStubMsg
->
PointerBufferMark
=
pStubMsg
->
Buffer
;
pStubMsg
->
PointerBufferMark
=
pStubMsg
->
Buffer
;
TRACE
(
"difference = 0x%x
\n
"
,
(
ULONG
)(
pStubMsg
->
PointerBufferMark
-
saved_buffer
));
TRACE
(
"difference = 0x%x
\n
"
,
(
ULONG
)(
pStubMsg
->
PointerBufferMark
-
saved_buffer
));
pointer_buffer_mark_set
=
1
;
pointer_buffer_mark_set
=
TRUE
;
/* restore the original buffer */
/* restore the original buffer */
pStubMsg
->
Buffer
=
saved_buffer
;
pStubMsg
->
Buffer
=
saved_buffer
;
...
@@ -4131,7 +4131,7 @@ unsigned char * WINAPI NdrComplexArrayMarshall(PMIDL_STUB_MESSAGE pStubMsg,
...
@@ -4131,7 +4131,7 @@ unsigned char * WINAPI NdrComplexArrayMarshall(PMIDL_STUB_MESSAGE pStubMsg,
unsigned
char
*
pMemory
,
unsigned
char
*
pMemory
,
PFORMAT_STRING
pFormat
)
PFORMAT_STRING
pFormat
)
{
{
int
pointer_buffer_mark_set
=
0
;
BOOL
pointer_buffer_mark_set
=
FALSE
;
TRACE
(
"(%p,%p,%p)
\n
"
,
pStubMsg
,
pMemory
,
pFormat
);
TRACE
(
"(%p,%p,%p)
\n
"
,
pStubMsg
,
pMemory
,
pFormat
);
...
@@ -4162,7 +4162,7 @@ unsigned char * WINAPI NdrComplexArrayMarshall(PMIDL_STUB_MESSAGE pStubMsg,
...
@@ -4162,7 +4162,7 @@ unsigned char * WINAPI NdrComplexArrayMarshall(PMIDL_STUB_MESSAGE pStubMsg,
/* save it for use by embedded pointer code later */
/* save it for use by embedded pointer code later */
pStubMsg
->
PointerBufferMark
=
(
unsigned
char
*
)
pStubMsg
->
RpcMsg
->
Buffer
+
pStubMsg
->
BufferLength
;
pStubMsg
->
PointerBufferMark
=
(
unsigned
char
*
)
pStubMsg
->
RpcMsg
->
Buffer
+
pStubMsg
->
BufferLength
;
TRACE
(
"difference = 0x%x
\n
"
,
(
ULONG
)(
pStubMsg
->
Buffer
-
(
unsigned
char
*
)
pStubMsg
->
RpcMsg
->
Buffer
));
TRACE
(
"difference = 0x%x
\n
"
,
(
ULONG
)(
pStubMsg
->
Buffer
-
(
unsigned
char
*
)
pStubMsg
->
RpcMsg
->
Buffer
));
pointer_buffer_mark_set
=
1
;
pointer_buffer_mark_set
=
TRUE
;
/* restore fields */
/* restore fields */
pStubMsg
->
ActualCount
=
saved_actual_count
;
pStubMsg
->
ActualCount
=
saved_actual_count
;
...
@@ -4195,7 +4195,7 @@ unsigned char * WINAPI NdrComplexArrayUnmarshall(PMIDL_STUB_MESSAGE pStubMsg,
...
@@ -4195,7 +4195,7 @@ unsigned char * WINAPI NdrComplexArrayUnmarshall(PMIDL_STUB_MESSAGE pStubMsg,
unsigned
char
fMustAlloc
)
unsigned
char
fMustAlloc
)
{
{
unsigned
char
*
saved_buffer
;
unsigned
char
*
saved_buffer
;
int
pointer_buffer_mark_set
=
0
;
BOOL
pointer_buffer_mark_set
=
FALSE
;
int
saved_ignore_embedded
;
int
saved_ignore_embedded
;
TRACE
(
"(%p,%p,%p,%d)
\n
"
,
pStubMsg
,
ppMemory
,
pFormat
,
fMustAlloc
);
TRACE
(
"(%p,%p,%p,%d)
\n
"
,
pStubMsg
,
ppMemory
,
pFormat
,
fMustAlloc
);
...
@@ -4222,7 +4222,7 @@ unsigned char * WINAPI NdrComplexArrayUnmarshall(PMIDL_STUB_MESSAGE pStubMsg,
...
@@ -4222,7 +4222,7 @@ unsigned char * WINAPI NdrComplexArrayUnmarshall(PMIDL_STUB_MESSAGE pStubMsg,
{
{
/* save it for use by embedded pointer code later */
/* save it for use by embedded pointer code later */
pStubMsg
->
PointerBufferMark
=
pStubMsg
->
Buffer
;
pStubMsg
->
PointerBufferMark
=
pStubMsg
->
Buffer
;
pointer_buffer_mark_set
=
1
;
pointer_buffer_mark_set
=
TRUE
;
}
}
/* restore the original buffer */
/* restore the original buffer */
pStubMsg
->
Buffer
=
saved_buffer
;
pStubMsg
->
Buffer
=
saved_buffer
;
...
@@ -5720,7 +5720,7 @@ static unsigned char *union_arm_marshall(PMIDL_STUB_MESSAGE pStubMsg, unsigned c
...
@@ -5720,7 +5720,7 @@ static unsigned char *union_arm_marshall(PMIDL_STUB_MESSAGE pStubMsg, unsigned c
if
(
m
)
if
(
m
)
{
{
unsigned
char
*
saved_buffer
=
NULL
;
unsigned
char
*
saved_buffer
=
NULL
;
int
pointer_buffer_mark_set
=
0
;
BOOL
pointer_buffer_mark_set
=
FALSE
;
switch
(
*
desc
)
switch
(
*
desc
)
{
{
case
RPC_FC_RP
:
case
RPC_FC_RP
:
...
@@ -5733,7 +5733,7 @@ static unsigned char *union_arm_marshall(PMIDL_STUB_MESSAGE pStubMsg, unsigned c
...
@@ -5733,7 +5733,7 @@ static unsigned char *union_arm_marshall(PMIDL_STUB_MESSAGE pStubMsg, unsigned c
{
{
pStubMsg
->
Buffer
=
pStubMsg
->
PointerBufferMark
;
pStubMsg
->
Buffer
=
pStubMsg
->
PointerBufferMark
;
pStubMsg
->
PointerBufferMark
=
NULL
;
pStubMsg
->
PointerBufferMark
=
NULL
;
pointer_buffer_mark_set
=
1
;
pointer_buffer_mark_set
=
TRUE
;
}
}
else
else
safe_buffer_increment
(
pStubMsg
,
4
);
/* for pointer ID */
safe_buffer_increment
(
pStubMsg
,
4
);
/* for pointer ID */
...
@@ -5788,7 +5788,7 @@ static unsigned char *union_arm_unmarshall(PMIDL_STUB_MESSAGE pStubMsg,
...
@@ -5788,7 +5788,7 @@ static unsigned char *union_arm_unmarshall(PMIDL_STUB_MESSAGE pStubMsg,
if
(
m
)
if
(
m
)
{
{
unsigned
char
*
saved_buffer
=
NULL
;
unsigned
char
*
saved_buffer
=
NULL
;
int
pointer_buffer_mark_set
=
0
;
BOOL
pointer_buffer_mark_set
=
FALSE
;
switch
(
*
desc
)
switch
(
*
desc
)
{
{
case
RPC_FC_RP
:
case
RPC_FC_RP
:
...
@@ -5801,7 +5801,7 @@ static unsigned char *union_arm_unmarshall(PMIDL_STUB_MESSAGE pStubMsg,
...
@@ -5801,7 +5801,7 @@ static unsigned char *union_arm_unmarshall(PMIDL_STUB_MESSAGE pStubMsg,
{
{
pStubMsg
->
Buffer
=
pStubMsg
->
PointerBufferMark
;
pStubMsg
->
Buffer
=
pStubMsg
->
PointerBufferMark
;
pStubMsg
->
PointerBufferMark
=
NULL
;
pStubMsg
->
PointerBufferMark
=
NULL
;
pointer_buffer_mark_set
=
1
;
pointer_buffer_mark_set
=
TRUE
;
}
}
else
else
pStubMsg
->
Buffer
+=
4
;
/* for pointer ID */
pStubMsg
->
Buffer
+=
4
;
/* for pointer ID */
...
...
dlls/rpcrt4/rpcrt4_main.c
View file @
47ed171a
...
@@ -390,7 +390,8 @@ static RPC_STATUS RPC_UuidGetNodeAddress(BYTE *address)
...
@@ -390,7 +390,8 @@ static RPC_STATUS RPC_UuidGetNodeAddress(BYTE *address)
*/
*/
RPC_STATUS
WINAPI
UuidCreateSequential
(
UUID
*
Uuid
)
RPC_STATUS
WINAPI
UuidCreateSequential
(
UUID
*
Uuid
)
{
{
static
int
initialised
,
count
;
static
BOOL
initialised
;
static
int
count
;
ULONGLONG
time
;
ULONGLONG
time
;
static
ULONGLONG
timelast
;
static
ULONGLONG
timelast
;
...
@@ -409,7 +410,7 @@ RPC_STATUS WINAPI UuidCreateSequential(UUID *Uuid)
...
@@ -409,7 +410,7 @@ RPC_STATUS WINAPI UuidCreateSequential(UUID *Uuid)
sequence
&=
0x1fff
;
sequence
&=
0x1fff
;
status
=
RPC_UuidGetNodeAddress
(
address
);
status
=
RPC_UuidGetNodeAddress
(
address
);
initialised
=
1
;
initialised
=
TRUE
;
}
}
/* Generate time element of the UUID. Account for going faster
/* Generate time element of the UUID. Account for going faster
...
...
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