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
e3bb1c82
Commit
e3bb1c82
authored
Feb 16, 2009
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Feb 16, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rpcrt4: Remove superfluous pointer casts.
parent
ff2da8ec
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
58 additions
and
62 deletions
+58
-62
cstub.c
dlls/rpcrt4/cstub.c
+1
-1
ndr_contexthandle.c
dlls/rpcrt4/ndr_contexthandle.c
+2
-2
ndr_es.c
dlls/rpcrt4/ndr_es.c
+2
-2
ndr_marshall.c
dlls/rpcrt4/ndr_marshall.c
+1
-1
ndr_stubless.c
dlls/rpcrt4/ndr_stubless.c
+2
-2
rpc_binding.c
dlls/rpcrt4/rpc_binding.c
+20
-20
rpc_epmap.c
dlls/rpcrt4/rpc_epmap.c
+11
-11
rpc_message.c
dlls/rpcrt4/rpc_message.c
+6
-6
rpc_server.c
dlls/rpcrt4/rpc_server.c
+3
-3
cstub.c
dlls/rpcrt4/tests/cstub.c
+4
-4
ndr_marshall.c
dlls/rpcrt4/tests/ndr_marshall.c
+6
-10
No files found.
dlls/rpcrt4/cstub.c
View file @
e3bb1c82
...
...
@@ -126,7 +126,7 @@ static struct
static
HRESULT
WINAPI
delegating_QueryInterface
(
IUnknown
*
pUnk
,
REFIID
iid
,
void
**
ppv
)
{
*
ppv
=
(
void
*
)
pUnk
;
*
ppv
=
pUnk
;
return
S_OK
;
}
...
...
dlls/rpcrt4/ndr_contexthandle.c
View file @
e3bb1c82
...
...
@@ -59,7 +59,7 @@ static CRITICAL_SECTION ndr_context_cs = { &ndr_context_debug, -1, 0, 0, 0, 0 };
static
struct
context_handle_entry
*
get_context_entry
(
NDR_CCONTEXT
CContext
)
{
struct
context_handle_entry
*
che
=
(
struct
context_handle_entry
*
)
CContext
;
struct
context_handle_entry
*
che
=
CContext
;
if
(
che
->
magic
!=
NDR_CONTEXT_HANDLE_MAGIC
)
return
NULL
;
...
...
@@ -111,7 +111,7 @@ void WINAPI NDRCContextMarshall(NDR_CCONTEXT CContext, void *pBuff)
}
else
{
ndr_context_handle
*
wire_data
=
(
ndr_context_handle
*
)
pBuff
;
ndr_context_handle
*
wire_data
=
pBuff
;
wire_data
->
attributes
=
0
;
wire_data
->
uuid
=
GUID_NULL
;
}
...
...
dlls/rpcrt4/ndr_es.c
View file @
e3bb1c82
...
...
@@ -105,7 +105,7 @@ RPC_STATUS WINAPI MesIncrementalHandleReset(
handle_t
Handle
,
void
*
UserState
,
MIDL_ES_ALLOC
AllocFn
,
MIDL_ES_WRITE
WriteFn
,
MIDL_ES_READ
ReadFn
,
MIDL_ES_CODE
Operation
)
{
MIDL_ES_MESSAGE
*
pEsMsg
=
(
MIDL_ES_MESSAGE
*
)
Handle
;
MIDL_ES_MESSAGE
*
pEsMsg
=
Handle
;
TRACE
(
"(%p, %p, %p, %p, %p, %d)
\n
"
,
Handle
,
UserState
,
AllocFn
,
WriteFn
,
ReadFn
,
Operation
);
...
...
@@ -324,7 +324,7 @@ void WINAPIV NdrMesProcEncodeDecode(handle_t Handle, const MIDL_STUB_DESC * pStu
{
/* pointer to start of stack where arguments start */
RPC_MESSAGE
rpcMsg
;
MIDL_ES_MESSAGE
*
pEsMsg
=
(
MIDL_ES_MESSAGE
*
)
Handle
;
MIDL_ES_MESSAGE
*
pEsMsg
=
Handle
;
/* size of stack */
unsigned
short
stack_size
;
/* header for procedure string */
...
...
dlls/rpcrt4/ndr_marshall.c
View file @
e3bb1c82
...
...
@@ -6627,7 +6627,7 @@ static unsigned char *WINAPI NdrContextHandleMarshall(
if
(
pFormat
[
1
]
&
0x80
)
NdrClientContextMarshall
(
pStubMsg
,
*
(
NDR_CCONTEXT
**
)
pMemory
,
FALSE
);
else
NdrClientContextMarshall
(
pStubMsg
,
(
NDR_CCONTEXT
*
)
pMemory
,
FALSE
);
NdrClientContextMarshall
(
pStubMsg
,
pMemory
,
FALSE
);
return
NULL
;
}
...
...
dlls/rpcrt4/ndr_stubless.c
View file @
e3bb1c82
...
...
@@ -173,7 +173,7 @@ static PFORMAT_STRING client_get_handle(
if
(
pDesc
->
flag_and_size
&
HANDLE_PARAM_IS_VIA_PTR
)
pArg
=
*
(
void
**
)
ARG_FROM_OFFSET
(
pStubMsg
->
StackTop
,
pDesc
->
offset
);
else
pArg
=
(
void
*
)
ARG_FROM_OFFSET
(
pStubMsg
->
StackTop
,
pDesc
->
offset
);
pArg
=
ARG_FROM_OFFSET
(
pStubMsg
->
StackTop
,
pDesc
->
offset
);
memcpy
(
&
pObject
,
pArg
,
pDesc
->
flag_and_size
&
0xf
);
pGenPair
=
&
pStubMsg
->
StubDesc
->
aGenericBindingRoutinePairs
[
pDesc
->
binding_routine_pair_index
];
*
phBinding
=
pGenPair
->
pfnBind
(
pObject
);
...
...
@@ -256,7 +256,7 @@ static void client_free_handle(
if
(
pDesc
->
flag_and_size
&
HANDLE_PARAM_IS_VIA_PTR
)
pArg
=
*
(
void
**
)
ARG_FROM_OFFSET
(
pStubMsg
->
StackTop
,
pDesc
->
offset
);
else
pArg
=
(
void
*
)
ARG_FROM_OFFSET
(
pStubMsg
->
StackTop
,
pDesc
->
offset
);
pArg
=
ARG_FROM_OFFSET
(
pStubMsg
->
StackTop
,
pDesc
->
offset
);
memcpy
(
&
pObject
,
pArg
,
pDesc
->
flag_and_size
&
0xf
);
pGenPair
=
&
pStubMsg
->
StubDesc
->
aGenericBindingRoutinePairs
[
pDesc
->
binding_routine_pair_index
];
pGenPair
->
pfnUnbind
(
pObject
,
hBinding
);
...
...
dlls/rpcrt4/rpc_binding.c
View file @
e3bb1c82
...
...
@@ -661,11 +661,11 @@ RPC_STATUS WINAPI RpcStringBindingParseA( RPC_CSTR StringBinding, RPC_CSTR *ObjU
return
RPC_S_OK
;
fail:
if
(
ObjUuid
)
RpcStringFreeA
(
(
unsigned
char
**
)
ObjUuid
);
if
(
Protseq
)
RpcStringFreeA
(
(
unsigned
char
**
)
Protseq
);
if
(
NetworkAddr
)
RpcStringFreeA
(
(
unsigned
char
**
)
NetworkAddr
);
if
(
Endpoint
)
RpcStringFreeA
(
(
unsigned
char
**
)
Endpoint
);
if
(
Options
)
RpcStringFreeA
(
(
unsigned
char
**
)
Options
);
if
(
ObjUuid
)
RpcStringFreeA
(
ObjUuid
);
if
(
Protseq
)
RpcStringFreeA
(
Protseq
);
if
(
NetworkAddr
)
RpcStringFreeA
(
NetworkAddr
);
if
(
Endpoint
)
RpcStringFreeA
(
Endpoint
);
if
(
Options
)
RpcStringFreeA
(
Options
);
return
RPC_S_INVALID_STRING_BINDING
;
}
...
...
@@ -812,7 +812,7 @@ RPC_STATUS WINAPI RpcBindingVectorFree( RPC_BINDING_VECTOR** BindingVector )
*/
RPC_STATUS
WINAPI
RpcBindingInqObject
(
RPC_BINDING_HANDLE
Binding
,
UUID
*
ObjectUuid
)
{
RpcBinding
*
bind
=
(
RpcBinding
*
)
Binding
;
RpcBinding
*
bind
=
Binding
;
TRACE
(
"(%p,%p) = %s
\n
"
,
Binding
,
ObjectUuid
,
debugstr_guid
(
&
bind
->
ObjectUuid
));
*
ObjectUuid
=
bind
->
ObjectUuid
;
...
...
@@ -824,7 +824,7 @@ RPC_STATUS WINAPI RpcBindingInqObject( RPC_BINDING_HANDLE Binding, UUID* ObjectU
*/
RPC_STATUS
WINAPI
RpcBindingSetObject
(
RPC_BINDING_HANDLE
Binding
,
UUID
*
ObjectUuid
)
{
RpcBinding
*
bind
=
(
RpcBinding
*
)
Binding
;
RpcBinding
*
bind
=
Binding
;
TRACE
(
"(%p,%s)
\n
"
,
Binding
,
debugstr_guid
(
ObjectUuid
));
if
(
bind
->
server
)
return
RPC_S_WRONG_KIND_OF_BINDING
;
...
...
@@ -856,11 +856,11 @@ RPC_STATUS WINAPI RpcBindingFromStringBindingA( RPC_CSTR StringBinding, RPC_BIND
if
(
ret
==
RPC_S_OK
)
ret
=
RPCRT4_CompleteBindingA
(
bind
,
(
char
*
)
NetworkAddr
,
(
char
*
)
Endpoint
,
(
char
*
)
Options
);
RpcStringFreeA
(
(
unsigned
char
**
)
&
Options
);
RpcStringFreeA
(
(
unsigned
char
**
)
&
Endpoint
);
RpcStringFreeA
(
(
unsigned
char
**
)
&
NetworkAddr
);
RpcStringFreeA
(
(
unsigned
char
**
)
&
Protseq
);
RpcStringFreeA
(
(
unsigned
char
**
)
&
ObjectUuid
);
RpcStringFreeA
(
&
Options
);
RpcStringFreeA
(
&
Endpoint
);
RpcStringFreeA
(
&
NetworkAddr
);
RpcStringFreeA
(
&
Protseq
);
RpcStringFreeA
(
&
ObjectUuid
);
if
(
ret
==
RPC_S_OK
)
*
Binding
=
(
RPC_BINDING_HANDLE
)
bind
;
...
...
@@ -915,7 +915,7 @@ RPC_STATUS WINAPI RpcBindingFromStringBindingW( RPC_WSTR StringBinding, RPC_BIND
RPC_STATUS
WINAPI
RpcBindingToStringBindingA
(
RPC_BINDING_HANDLE
Binding
,
RPC_CSTR
*
StringBinding
)
{
RPC_STATUS
ret
;
RpcBinding
*
bind
=
(
RpcBinding
*
)
Binding
;
RpcBinding
*
bind
=
Binding
;
RPC_CSTR
ObjectUuid
;
TRACE
(
"(%p,%p)
\n
"
,
Binding
,
StringBinding
);
...
...
@@ -946,7 +946,7 @@ RPC_STATUS WINAPI RpcBindingToStringBindingW( RPC_BINDING_HANDLE Binding, RPC_WS
TRACE
(
"(%p,%p)
\n
"
,
Binding
,
StringBinding
);
ret
=
RpcBindingToStringBindingA
(
Binding
,
&
str
);
*
StringBinding
=
RPCRT4_strdupAtoW
((
char
*
)
str
);
RpcStringFreeA
(
(
unsigned
char
**
)
&
str
);
RpcStringFreeA
(
&
str
);
return
ret
;
}
...
...
@@ -969,7 +969,7 @@ RPC_STATUS WINAPI I_RpcBindingInqTransportType( RPC_BINDING_HANDLE Binding, unsi
*/
RPC_STATUS
WINAPI
I_RpcBindingSetAsync
(
RPC_BINDING_HANDLE
Binding
,
RPC_BLOCKING_FN
BlockingFn
)
{
RpcBinding
*
bind
=
(
RpcBinding
*
)
Binding
;
RpcBinding
*
bind
=
Binding
;
TRACE
(
"(%p,%p): stub
\n
"
,
Binding
,
BlockingFn
);
...
...
@@ -986,7 +986,7 @@ RPC_STATUS RPC_ENTRY RpcBindingCopy(
RPC_BINDING_HANDLE
*
DestinationBinding
)
{
RpcBinding
*
DestBinding
;
RpcBinding
*
SrcBinding
=
(
RpcBinding
*
)
SourceBinding
;
RpcBinding
*
SrcBinding
=
SourceBinding
;
RPC_STATUS
status
;
TRACE
(
"(%p, %p)
\n
"
,
SourceBinding
,
DestinationBinding
);
...
...
@@ -1501,7 +1501,7 @@ RpcBindingSetAuthInfoExA( RPC_BINDING_HANDLE Binding, RPC_CSTR ServerPrincName,
RPC_AUTH_IDENTITY_HANDLE
AuthIdentity
,
ULONG
AuthzSvr
,
RPC_SECURITY_QOS
*
SecurityQos
)
{
RpcBinding
*
bind
=
(
RpcBinding
*
)
Binding
;
RpcBinding
*
bind
=
Binding
;
SECURITY_STATUS
r
;
CredHandle
cred
;
TimeStamp
exp
;
...
...
@@ -1631,7 +1631,7 @@ RpcBindingSetAuthInfoExW( RPC_BINDING_HANDLE Binding, RPC_WSTR ServerPrincName,
ULONG
AuthnSvc
,
RPC_AUTH_IDENTITY_HANDLE
AuthIdentity
,
ULONG
AuthzSvr
,
RPC_SECURITY_QOS
*
SecurityQos
)
{
RpcBinding
*
bind
=
(
RpcBinding
*
)
Binding
;
RpcBinding
*
bind
=
Binding
;
SECURITY_STATUS
r
;
CredHandle
cred
;
TimeStamp
exp
;
...
...
@@ -1640,7 +1640,7 @@ RpcBindingSetAuthInfoExW( RPC_BINDING_HANDLE Binding, RPC_WSTR ServerPrincName,
PSecPkgInfoW
packages
;
ULONG
cbMaxToken
;
TRACE
(
"%p %s %u %u %p %u %p
\n
"
,
Binding
,
debugstr_w
(
(
const
WCHAR
*
)
ServerPrincName
),
TRACE
(
"%p %s %u %u %p %u %p
\n
"
,
Binding
,
debugstr_w
(
ServerPrincName
),
AuthnLevel
,
AuthnSvc
,
AuthIdentity
,
AuthzSvr
,
SecurityQos
);
if
(
SecurityQos
)
...
...
@@ -1772,7 +1772,7 @@ RPCRTAPI RPC_STATUS RPC_ENTRY
RpcBindingSetAuthInfoW
(
RPC_BINDING_HANDLE
Binding
,
RPC_WSTR
ServerPrincName
,
ULONG
AuthnLevel
,
ULONG
AuthnSvc
,
RPC_AUTH_IDENTITY_HANDLE
AuthIdentity
,
ULONG
AuthzSvr
)
{
TRACE
(
"%p %s %u %u %p %u
\n
"
,
Binding
,
debugstr_w
(
(
const
WCHAR
*
)
ServerPrincName
),
TRACE
(
"%p %s %u %u %p %u
\n
"
,
Binding
,
debugstr_w
(
ServerPrincName
),
AuthnLevel
,
AuthnSvc
,
AuthIdentity
,
AuthzSvr
);
return
RpcBindingSetAuthInfoExW
(
Binding
,
ServerPrincName
,
AuthnLevel
,
AuthnSvc
,
AuthIdentity
,
AuthzSvr
,
NULL
);
}
...
...
dlls/rpcrt4/rpc_epmap.c
View file @
e3bb1c82
...
...
@@ -116,7 +116,7 @@ static BOOL start_rpcss(void)
static
inline
BOOL
is_epm_destination_local
(
RPC_BINDING_HANDLE
handle
)
{
RpcBinding
*
bind
=
(
RpcBinding
*
)
handle
;
RpcBinding
*
bind
=
handle
;
const
char
*
protseq
=
bind
->
Protseq
;
const
char
*
network_addr
=
bind
->
NetworkAddr
;
...
...
@@ -127,7 +127,7 @@ static inline BOOL is_epm_destination_local(RPC_BINDING_HANDLE handle)
static
RPC_STATUS
get_epm_handle_client
(
RPC_BINDING_HANDLE
handle
,
RPC_BINDING_HANDLE
*
epm_handle
)
{
RpcBinding
*
bind
=
(
RpcBinding
*
)
handle
;
RpcBinding
*
bind
=
handle
;
const
char
*
pszEndpoint
=
NULL
;
RPC_STATUS
status
;
RpcBinding
*
epm_bind
;
...
...
@@ -149,7 +149,7 @@ static RPC_STATUS get_epm_handle_client(RPC_BINDING_HANDLE handle, RPC_BINDING_H
status
=
RpcBindingCopy
(
handle
,
epm_handle
);
if
(
status
!=
RPC_S_OK
)
return
status
;
epm_bind
=
(
RpcBinding
*
)
*
epm_handle
;
epm_bind
=
*
epm_handle
;
if
(
epm_bind
->
AuthInfo
)
{
/* don't bother with authenticating against the EPM by default
...
...
@@ -187,7 +187,7 @@ static LONG WINAPI rpc_filter(EXCEPTION_POINTERS *__eptr)
RPC_STATUS
WINAPI
RpcEpRegisterA
(
RPC_IF_HANDLE
IfSpec
,
RPC_BINDING_VECTOR
*
BindingVector
,
UUID_VECTOR
*
UuidVector
,
RPC_CSTR
Annotation
)
{
PRPC_SERVER_INTERFACE
If
=
(
PRPC_SERVER_INTERFACE
)
IfSpec
;
PRPC_SERVER_INTERFACE
If
=
IfSpec
;
unsigned
long
i
;
RPC_STATUS
status
=
RPC_S_OK
;
error_status_t
status2
;
...
...
@@ -197,7 +197,7 @@ RPC_STATUS WINAPI RpcEpRegisterA( RPC_IF_HANDLE IfSpec, RPC_BINDING_VECTOR *Bind
TRACE
(
"(%p,%p,%p,%s)
\n
"
,
IfSpec
,
BindingVector
,
UuidVector
,
debugstr_a
((
char
*
)
Annotation
));
TRACE
(
" ifid=%s
\n
"
,
debugstr_guid
(
&
If
->
InterfaceId
.
SyntaxGUID
));
for
(
i
=
0
;
i
<
BindingVector
->
Count
;
i
++
)
{
RpcBinding
*
bind
=
(
RpcBinding
*
)(
BindingVector
->
BindingH
[
i
])
;
RpcBinding
*
bind
=
BindingVector
->
BindingH
[
i
]
;
TRACE
(
" protseq[%ld]=%s
\n
"
,
i
,
debugstr_a
(
bind
->
Protseq
));
TRACE
(
" endpoint[%ld]=%s
\n
"
,
i
,
debugstr_a
(
bind
->
Endpoint
));
}
...
...
@@ -222,7 +222,7 @@ RPC_STATUS WINAPI RpcEpRegisterA( RPC_IF_HANDLE IfSpec, RPC_BINDING_VECTOR *Bind
for
(
i
=
0
;
i
<
BindingVector
->
Count
;
i
++
)
{
unsigned
j
;
RpcBinding
*
bind
=
(
RpcBinding
*
)(
BindingVector
->
BindingH
[
i
])
;
RpcBinding
*
bind
=
BindingVector
->
BindingH
[
i
]
;
for
(
j
=
0
;
j
<
(
UuidVector
?
UuidVector
->
Count
:
1
);
j
++
)
{
int
len
=
strlen
((
char
*
)
Annotation
);
...
...
@@ -286,7 +286,7 @@ RPC_STATUS WINAPI RpcEpRegisterA( RPC_IF_HANDLE IfSpec, RPC_BINDING_VECTOR *Bind
RPC_STATUS
WINAPI
RpcEpUnregister
(
RPC_IF_HANDLE
IfSpec
,
RPC_BINDING_VECTOR
*
BindingVector
,
UUID_VECTOR
*
UuidVector
)
{
PRPC_SERVER_INTERFACE
If
=
(
PRPC_SERVER_INTERFACE
)
IfSpec
;
PRPC_SERVER_INTERFACE
If
=
IfSpec
;
unsigned
long
i
;
RPC_STATUS
status
=
RPC_S_OK
;
error_status_t
status2
;
...
...
@@ -296,7 +296,7 @@ RPC_STATUS WINAPI RpcEpUnregister( RPC_IF_HANDLE IfSpec, RPC_BINDING_VECTOR *Bin
TRACE
(
"(%p,%p,%p)
\n
"
,
IfSpec
,
BindingVector
,
UuidVector
);
TRACE
(
" ifid=%s
\n
"
,
debugstr_guid
(
&
If
->
InterfaceId
.
SyntaxGUID
));
for
(
i
=
0
;
i
<
BindingVector
->
Count
;
i
++
)
{
RpcBinding
*
bind
=
(
RpcBinding
*
)(
BindingVector
->
BindingH
[
i
])
;
RpcBinding
*
bind
=
BindingVector
->
BindingH
[
i
]
;
TRACE
(
" protseq[%ld]=%s
\n
"
,
i
,
debugstr_a
(
bind
->
Protseq
));
TRACE
(
" endpoint[%ld]=%s
\n
"
,
i
,
debugstr_a
(
bind
->
Endpoint
));
}
...
...
@@ -319,7 +319,7 @@ RPC_STATUS WINAPI RpcEpUnregister( RPC_IF_HANDLE IfSpec, RPC_BINDING_VECTOR *Bin
for
(
i
=
0
;
i
<
BindingVector
->
Count
;
i
++
)
{
unsigned
j
;
RpcBinding
*
bind
=
(
RpcBinding
*
)(
BindingVector
->
BindingH
[
i
])
;
RpcBinding
*
bind
=
BindingVector
->
BindingH
[
i
]
;
for
(
j
=
0
;
j
<
(
UuidVector
?
UuidVector
->
Count
:
1
);
j
++
)
{
status
=
TowerConstruct
(
&
If
->
InterfaceId
,
&
If
->
TransferSyntax
,
...
...
@@ -372,8 +372,8 @@ RPC_STATUS WINAPI RpcEpUnregister( RPC_IF_HANDLE IfSpec, RPC_BINDING_VECTOR *Bin
*/
RPC_STATUS
WINAPI
RpcEpResolveBinding
(
RPC_BINDING_HANDLE
Binding
,
RPC_IF_HANDLE
IfSpec
)
{
PRPC_CLIENT_INTERFACE
If
=
(
PRPC_CLIENT_INTERFACE
)
IfSpec
;
RpcBinding
*
bind
=
(
RpcBinding
*
)
Binding
;
PRPC_CLIENT_INTERFACE
If
=
IfSpec
;
RpcBinding
*
bind
=
Binding
;
RPC_STATUS
status
;
error_status_t
status2
;
handle_t
handle
;
...
...
dlls/rpcrt4/rpc_message.c
View file @
e3bb1c82
...
...
@@ -998,7 +998,7 @@ RPC_STATUS RPCRT4_Receive(RpcConnection *Connection, RpcPktHdr **Header,
*/
RPC_STATUS
WINAPI
I_RpcNegotiateTransferSyntax
(
PRPC_MESSAGE
pMsg
)
{
RpcBinding
*
bind
=
(
RpcBinding
*
)
pMsg
->
Handle
;
RpcBinding
*
bind
=
pMsg
->
Handle
;
RpcConnection
*
conn
;
RPC_STATUS
status
=
RPC_S_OK
;
...
...
@@ -1063,7 +1063,7 @@ RPC_STATUS WINAPI I_RpcNegotiateTransferSyntax(PRPC_MESSAGE pMsg)
RPC_STATUS
WINAPI
I_RpcGetBuffer
(
PRPC_MESSAGE
pMsg
)
{
RPC_STATUS
status
;
RpcBinding
*
bind
=
(
RpcBinding
*
)
pMsg
->
Handle
;
RpcBinding
*
bind
=
pMsg
->
Handle
;
TRACE
(
"(%p): BufferLength=%d
\n
"
,
pMsg
,
pMsg
->
BufferLength
);
...
...
@@ -1120,7 +1120,7 @@ static RPC_STATUS I_RpcReAllocateBuffer(PRPC_MESSAGE pMsg)
*/
RPC_STATUS
WINAPI
I_RpcFreeBuffer
(
PRPC_MESSAGE
pMsg
)
{
RpcBinding
*
bind
=
(
RpcBinding
*
)
pMsg
->
Handle
;
RpcBinding
*
bind
=
pMsg
->
Handle
;
TRACE
(
"(%p) Buffer=%p
\n
"
,
pMsg
,
pMsg
->
Buffer
);
...
...
@@ -1214,7 +1214,7 @@ static DWORD WINAPI async_notifier_proc(LPVOID p)
*/
RPC_STATUS
WINAPI
I_RpcSend
(
PRPC_MESSAGE
pMsg
)
{
RpcBinding
*
bind
=
(
RpcBinding
*
)
pMsg
->
Handle
;
RpcBinding
*
bind
=
pMsg
->
Handle
;
RpcConnection
*
conn
;
RPC_STATUS
status
;
RpcPktHdr
*
hdr
;
...
...
@@ -1268,7 +1268,7 @@ static inline BOOL is_hard_error(RPC_STATUS status)
*/
RPC_STATUS
WINAPI
I_RpcReceive
(
PRPC_MESSAGE
pMsg
)
{
RpcBinding
*
bind
=
(
RpcBinding
*
)
pMsg
->
Handle
;
RpcBinding
*
bind
=
pMsg
->
Handle
;
RPC_STATUS
status
;
RpcPktHdr
*
hdr
=
NULL
;
RpcConnection
*
conn
;
...
...
@@ -1360,7 +1360,7 @@ RPC_STATUS WINAPI I_RpcSendReceive(PRPC_MESSAGE pMsg)
*/
RPC_STATUS
WINAPI
I_RpcAsyncSetHandle
(
PRPC_MESSAGE
pMsg
,
PRPC_ASYNC_STATE
pAsync
)
{
RpcBinding
*
bind
=
(
RpcBinding
*
)
pMsg
->
Handle
;
RpcBinding
*
bind
=
pMsg
->
Handle
;
RpcConnection
*
conn
;
TRACE
(
"(%p, %p)
\n
"
,
pMsg
,
pAsync
);
...
...
dlls/rpcrt4/rpc_server.c
View file @
e3bb1c82
...
...
@@ -367,7 +367,7 @@ static DWORD CALLBACK RPCRT4_worker_thread(LPVOID the_arg)
static
DWORD
CALLBACK
RPCRT4_io_thread
(
LPVOID
the_arg
)
{
RpcConnection
*
conn
=
(
RpcConnection
*
)
the_arg
;
RpcConnection
*
conn
=
the_arg
;
RpcPktHdr
*
hdr
;
RPC_MESSAGE
*
msg
;
RPC_STATUS
status
;
...
...
@@ -823,7 +823,7 @@ RPC_STATUS WINAPI RpcServerRegisterIfEx( RPC_IF_HANDLE IfSpec, UUID* MgrTypeUuid
RPC_STATUS
WINAPI
RpcServerRegisterIf2
(
RPC_IF_HANDLE
IfSpec
,
UUID
*
MgrTypeUuid
,
RPC_MGR_EPV
*
MgrEpv
,
UINT
Flags
,
UINT
MaxCalls
,
UINT
MaxRpcSize
,
RPC_IF_CALLBACK_FN
*
IfCallbackFn
)
{
PRPC_SERVER_INTERFACE
If
=
(
PRPC_SERVER_INTERFACE
)
IfSpec
;
PRPC_SERVER_INTERFACE
If
=
IfSpec
;
RpcServerInterface
*
sif
;
unsigned
int
i
;
...
...
@@ -876,7 +876,7 @@ RPC_STATUS WINAPI RpcServerRegisterIf2( RPC_IF_HANDLE IfSpec, UUID* MgrTypeUuid,
*/
RPC_STATUS
WINAPI
RpcServerUnregisterIf
(
RPC_IF_HANDLE
IfSpec
,
UUID
*
MgrTypeUuid
,
UINT
WaitForCallsToComplete
)
{
PRPC_SERVER_INTERFACE
If
=
(
PRPC_SERVER_INTERFACE
)
IfSpec
;
PRPC_SERVER_INTERFACE
If
=
IfSpec
;
HANDLE
event
=
NULL
;
BOOL
found
=
FALSE
;
BOOL
completed
=
TRUE
;
...
...
dlls/rpcrt4/tests/cstub.c
View file @
e3bb1c82
...
...
@@ -368,10 +368,10 @@ static const CInterfaceProxyVtbl *cstub_ProxyVtblList[] =
static
const
CInterfaceStubVtbl
*
cstub_StubVtblList
[]
=
{
(
const
CInterfaceStubVtbl
*
)
&
if1_stub_vtbl
,
(
const
CInterfaceStubVtbl
*
)
&
if2_stub_vtbl
,
(
const
CInterfaceStubVtbl
*
)
&
if3_stub_vtbl
,
(
const
CInterfaceStubVtbl
*
)
&
if4_stub_vtbl
,
&
if1_stub_vtbl
,
&
if2_stub_vtbl
,
&
if3_stub_vtbl
,
&
if4_stub_vtbl
,
NULL
};
...
...
dlls/rpcrt4/tests/ndr_marshall.c
View file @
e3bb1c82
...
...
@@ -715,11 +715,11 @@ static void test_simple_struct_marshal(const unsigned char *formattypes,
NdrClientInitializeNew
(
&
RpcMessage
,
&
StubMsg
,
&
StubDesc
,
0
);
StubMsg
.
BufferLength
=
0
;
NdrSimpleStructBufferSize
(
&
StubMsg
,
(
unsigned
char
*
)
memsrc
,
formattypes
);
NdrSimpleStructBufferSize
(
&
StubMsg
,
memsrc
,
formattypes
);
ok
(
StubMsg
.
BufferLength
>=
wiredatalen
,
"%s: length %d
\n
"
,
msgpfx
,
StubMsg
.
BufferLength
);
StubMsg
.
RpcMsg
->
Buffer
=
StubMsg
.
BufferStart
=
StubMsg
.
Buffer
=
HeapAlloc
(
GetProcessHeap
(),
0
,
StubMsg
.
BufferLength
);
StubMsg
.
BufferEnd
=
StubMsg
.
BufferStart
+
StubMsg
.
BufferLength
;
ptr
=
NdrSimpleStructMarshall
(
&
StubMsg
,
(
unsigned
char
*
)
memsrc
,
formattypes
);
ptr
=
NdrSimpleStructMarshall
(
&
StubMsg
,
memsrc
,
formattypes
);
ok
(
ptr
==
NULL
,
"%s: ret %p
\n
"
,
msgpfx
,
ptr
);
ok
(
StubMsg
.
Buffer
-
StubMsg
.
BufferStart
==
wiredatalen
,
"%s: Buffer %p Start %p
\n
"
,
msgpfx
,
StubMsg
.
Buffer
,
StubMsg
.
BufferStart
);
ok
(
!
memcmp
(
StubMsg
.
BufferStart
,
wiredata
,
wiredatalen
),
"%s: incorrectly marshaled %08x %08x %08x
\n
"
,
msgpfx
,
*
(
DWORD
*
)
StubMsg
.
BufferStart
,
*
((
DWORD
*
)
StubMsg
.
BufferStart
+
1
),
*
((
DWORD
*
)
StubMsg
.
BufferStart
+
2
));
...
...
@@ -1693,16 +1693,14 @@ static void test_nonconformant_string(void)
StubMsg
.
BufferLength
=
0
;
NdrNonConformantStringBufferSize
(
&
StubMsg
,
(
unsigned
char
*
)
memsrc
,
fmtstr_nonconf_str
);
NdrNonConformantStringBufferSize
(
&
StubMsg
,
memsrc
,
fmtstr_nonconf_str
);
ok
(
StubMsg
.
BufferLength
>=
strlen
((
char
*
)
memsrc
)
+
1
+
8
,
"length %d
\n
"
,
StubMsg
.
BufferLength
);
/*NdrGetBuffer(&_StubMsg, _StubMsg.BufferLength, NULL);*/
StubMsg
.
RpcMsg
->
Buffer
=
StubMsg
.
BufferStart
=
StubMsg
.
Buffer
=
HeapAlloc
(
GetProcessHeap
(),
0
,
StubMsg
.
BufferLength
);
StubMsg
.
BufferEnd
=
StubMsg
.
BufferStart
+
StubMsg
.
BufferLength
;
ptr
=
NdrNonConformantStringMarshall
(
&
StubMsg
,
(
unsigned
char
*
)
memsrc
,
fmtstr_nonconf_str
);
ptr
=
NdrNonConformantStringMarshall
(
&
StubMsg
,
memsrc
,
fmtstr_nonconf_str
);
ok
(
ptr
==
NULL
,
"ret %p
\n
"
,
ptr
);
size
=
StubMsg
.
Buffer
-
StubMsg
.
BufferStart
;
ok
(
size
==
strlen
((
char
*
)
memsrc
)
+
1
+
8
,
"Buffer %p Start %p len %d
\n
"
,
...
...
@@ -1768,16 +1766,14 @@ static void test_nonconformant_string(void)
StubMsg
.
BufferLength
=
0
;
NdrNonConformantStringBufferSize
(
&
StubMsg
,
(
unsigned
char
*
)
memsrc2
,
fmtstr_nonconf_str
);
NdrNonConformantStringBufferSize
(
&
StubMsg
,
memsrc2
,
fmtstr_nonconf_str
);
ok
(
StubMsg
.
BufferLength
>=
strlen
((
char
*
)
memsrc2
)
+
1
+
8
,
"length %d
\n
"
,
StubMsg
.
BufferLength
);
/*NdrGetBuffer(&_StubMsg, _StubMsg.BufferLength, NULL);*/
StubMsg
.
RpcMsg
->
Buffer
=
StubMsg
.
BufferStart
=
StubMsg
.
Buffer
=
HeapAlloc
(
GetProcessHeap
(),
0
,
StubMsg
.
BufferLength
);
StubMsg
.
BufferEnd
=
StubMsg
.
BufferStart
+
StubMsg
.
BufferLength
;
ptr
=
NdrNonConformantStringMarshall
(
&
StubMsg
,
(
unsigned
char
*
)
memsrc2
,
fmtstr_nonconf_str
);
ptr
=
NdrNonConformantStringMarshall
(
&
StubMsg
,
memsrc2
,
fmtstr_nonconf_str
);
ok
(
ptr
==
NULL
,
"ret %p
\n
"
,
ptr
);
size
=
StubMsg
.
Buffer
-
StubMsg
.
BufferStart
;
ok
(
size
==
strlen
((
char
*
)
memsrc2
)
+
1
+
8
,
"Buffer %p Start %p len %d
\n
"
,
...
...
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