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
e86eb8ef
Commit
e86eb8ef
authored
Jan 04, 2009
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Jan 04, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
include: Change RPC_STATUS from long to LONG for Win64 compatibility.
Also fix the compiler warnings introduced by this change.
parent
969ef6d3
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
85 additions
and
85 deletions
+85
-85
crypt.c
dlls/advapi32/crypt.c
+1
-1
rpc.c
dlls/ole32/rpc.c
+8
-8
typelib.c
dlls/oleaut32/tests/typelib.c
+1
-1
ndr_clientserver.c
dlls/rpcrt4/ndr_clientserver.c
+1
-1
rpc_assoc.c
dlls/rpcrt4/rpc_assoc.c
+1
-1
rpc_epmap.c
dlls/rpcrt4/rpc_epmap.c
+1
-1
rpc_message.c
dlls/rpcrt4/rpc_message.c
+1
-1
rpc_server.c
dlls/rpcrt4/rpc_server.c
+1
-1
rpcrt4_main.c
dlls/rpcrt4/rpcrt4_main.c
+1
-1
ndr_marshall.c
dlls/rpcrt4/tests/ndr_marshall.c
+9
-9
rpc.c
dlls/rpcrt4/tests/rpc.c
+47
-47
rpc_async.c
dlls/rpcrt4/tests/rpc_async.c
+6
-6
server.c
dlls/rpcrt4/tests/server.c
+5
-5
rpc.h
include/rpc.h
+1
-1
epmp.c
programs/rpcss/epmp.c
+1
-1
No files found.
dlls/advapi32/crypt.c
View file @
e86eb8ef
...
...
@@ -305,7 +305,7 @@ static void CRYPT_CreateMachineGuid(void)
'%'
,
'0'
,
'2'
,
'x'
,
'%'
,
'0'
,
'2'
,
'x'
,
'%'
,
'0'
,
'2'
,
'x'
,
0
};
pUuidCreate
=
GetProcAddress
(
lib
,
"UuidCreate"
);
pUuidCreate
=
(
void
*
)
GetProcAddress
(
lib
,
"UuidCreate"
);
rs
=
pUuidCreate
(
&
uuid
);
if
(
rs
==
S_OK
)
{
...
...
dlls/ole32/rpc.c
View file @
e86eb8ef
...
...
@@ -568,7 +568,7 @@ static HRESULT WINAPI ServerRpcChannelBuffer_GetBuffer(LPRPCCHANNELBUFFER iface,
/* save away the message state again */
msg
->
Handle
=
message_state
;
TRACE
(
"-- %
l
d
\n
"
,
status
);
TRACE
(
"-- %d
\n
"
,
status
);
return
HRESULT_FROM_WIN32
(
status
);
}
...
...
@@ -751,7 +751,7 @@ static HRESULT WINAPI ClientRpcChannelBuffer_GetBuffer(LPRPCCHANNELBUFFER iface,
HeapFree
(
GetProcessHeap
(),
0
,
channel_hook_data
);
TRACE
(
"-- %
l
d
\n
"
,
status
);
TRACE
(
"-- %d
\n
"
,
status
);
return
HRESULT_FROM_WIN32
(
status
);
}
...
...
@@ -771,7 +771,7 @@ static DWORD WINAPI rpc_sendreceive_thread(LPVOID param)
* RPC functions do */
data
->
status
=
I_RpcSendReceive
((
RPC_MESSAGE
*
)
data
->
msg
);
TRACE
(
"completed with status 0x%
l
x
\n
"
,
data
->
status
);
TRACE
(
"completed with status 0x%x
\n
"
,
data
->
status
);
SetEvent
(
data
->
handle
);
...
...
@@ -893,7 +893,7 @@ static HRESULT WINAPI ClientRpcChannelBuffer_SendReceive(LPRPCCHANNELBUFFER ifac
orpcthat
.
flags
=
ORPCF_NULL
;
orpcthat
.
extensions
=
NULL
;
TRACE
(
"RPC call status: 0x%
l
x
\n
"
,
status
);
TRACE
(
"RPC call status: 0x%x
\n
"
,
status
);
if
(
status
!=
RPC_S_OK
)
hr
=
HRESULT_FROM_WIN32
(
status
);
...
...
@@ -967,7 +967,7 @@ static HRESULT WINAPI ServerRpcChannelBuffer_FreeBuffer(LPRPCCHANNELBUFFER iface
msg
->
Handle
=
message_state
;
TRACE
(
"-- %
l
d
\n
"
,
status
);
TRACE
(
"-- %d
\n
"
,
status
);
return
HRESULT_FROM_WIN32
(
status
);
}
...
...
@@ -1003,7 +1003,7 @@ static HRESULT WINAPI ClientRpcChannelBuffer_FreeBuffer(LPRPCCHANNELBUFFER iface
IRpcChannelBuffer_Release
(
message_state
->
params
.
chan
);
HeapFree
(
GetProcessHeap
(),
0
,
message_state
);
TRACE
(
"-- %
l
d
\n
"
,
status
);
TRACE
(
"-- %d
\n
"
,
status
);
return
HRESULT_FROM_WIN32
(
status
);
}
...
...
@@ -1104,7 +1104,7 @@ HRESULT RPC_CreateClientChannel(const OXID *oxid, const IPID *ipid,
if
(
status
!=
RPC_S_OK
)
{
ERR
(
"Couldn't get binding for endpoint %s, status = %
l
d
\n
"
,
debugstr_w
(
endpoint
),
status
);
ERR
(
"Couldn't get binding for endpoint %s, status = %d
\n
"
,
debugstr_w
(
endpoint
),
status
);
return
HRESULT_FROM_WIN32
(
status
);
}
...
...
@@ -1536,7 +1536,7 @@ HRESULT RPC_RegisterInterface(REFIID riid)
list_add_tail
(
&
registered_interfaces
,
&
rif
->
entry
);
else
{
ERR
(
"RpcServerRegisterIfEx failed with error %
l
d
\n
"
,
status
);
ERR
(
"RpcServerRegisterIfEx failed with error %d
\n
"
,
status
);
HeapFree
(
GetProcessHeap
(),
0
,
rif
);
hr
=
HRESULT_FROM_WIN32
(
status
);
}
...
...
dlls/oleaut32/tests/typelib.c
View file @
e86eb8ef
...
...
@@ -649,7 +649,7 @@ static void test_QueryPathOfRegTypeLib(void)
BSTR
path
;
status
=
UuidCreate
(
&
uid
);
ok
(
!
status
||
status
==
RPC_S_UUID_LOCAL_ONLY
,
"UuidCreate error %08
l
x
\n
"
,
status
);
ok
(
!
status
||
status
==
RPC_S_UUID_LOCAL_ONLY
,
"UuidCreate error %08x
\n
"
,
status
);
StringFromGUID2
(
&
uid
,
uid_str
,
40
);
/*trace("GUID: %s\n", wine_dbgstr_w(uid_str));*/
...
...
dlls/rpcrt4/ndr_clientserver.c
View file @
e86eb8ef
...
...
@@ -232,7 +232,7 @@ RPC_STATUS RPC_ENTRY NdrMapCommAndFaultStatus( PMIDL_STUB_MESSAGE pStubMsg,
ULONG
*
pFaultStatus
,
RPC_STATUS
Status
)
{
TRACE
(
"(%p, %p, %p, %
l
d)
\n
"
,
pStubMsg
,
pCommStatus
,
pFaultStatus
,
Status
);
TRACE
(
"(%p, %p, %p, %d)
\n
"
,
pStubMsg
,
pCommStatus
,
pFaultStatus
,
Status
);
switch
(
Status
)
{
...
...
dlls/rpcrt4/rpc_assoc.c
View file @
e86eb8ef
...
...
@@ -240,7 +240,7 @@ static RPC_STATUS RpcAssoc_BindConnection(const RpcAssoc *assoc, RpcConnection *
status
=
RPCRT4_ReceiveWithAuth
(
conn
,
&
response_hdr
,
&
msg
,
&
auth_data
,
&
auth_length
);
if
(
status
!=
RPC_S_OK
)
{
ERR
(
"receive failed with error %
l
d
\n
"
,
status
);
ERR
(
"receive failed with error %d
\n
"
,
status
);
return
status
;
}
...
...
dlls/rpcrt4/rpc_epmap.c
View file @
e86eb8ef
...
...
@@ -444,7 +444,7 @@ RPC_STATUS WINAPI RpcEpResolveBinding( RPC_BINDING_HANDLE Binding, RPC_IF_HANDLE
if
(
!
resolved_endpoint
)
{
status
=
TowerExplode
(
towers
[
i
],
NULL
,
NULL
,
NULL
,
&
resolved_endpoint
,
NULL
);
TRACE
(
"status = %
l
d
\n
"
,
status
);
TRACE
(
"status = %d
\n
"
,
status
);
}
I_RpcFree
(
towers
[
i
]);
}
...
...
dlls/rpcrt4/rpc_message.c
View file @
e86eb8ef
...
...
@@ -1279,7 +1279,7 @@ RPC_STATUS WINAPI I_RpcReceive(PRPC_MESSAGE pMsg)
conn
=
pMsg
->
ReservedForRuntime
;
status
=
RPCRT4_Receive
(
conn
,
&
hdr
,
pMsg
);
if
(
status
!=
RPC_S_OK
)
{
WARN
(
"receive failed with error %
l
x
\n
"
,
status
);
WARN
(
"receive failed with error %x
\n
"
,
status
);
goto
fail
;
}
...
...
dlls/rpcrt4/rpc_server.c
View file @
e86eb8ef
...
...
@@ -380,7 +380,7 @@ static DWORD CALLBACK RPCRT4_io_thread(LPVOID the_arg)
status
=
RPCRT4_Receive
(
conn
,
&
hdr
,
msg
);
if
(
status
!=
RPC_S_OK
)
{
WARN
(
"receive failed with error %
l
x
\n
"
,
status
);
WARN
(
"receive failed with error %x
\n
"
,
status
);
HeapFree
(
GetProcessHeap
(),
0
,
msg
);
break
;
}
...
...
dlls/rpcrt4/rpcrt4_main.c
View file @
e86eb8ef
...
...
@@ -715,7 +715,7 @@ void WINAPI I_RpcFree(void *Object)
*/
LONG
WINAPI
I_RpcMapWin32Status
(
RPC_STATUS
status
)
{
TRACE
(
"(%
l
d)
\n
"
,
status
);
TRACE
(
"(%d)
\n
"
,
status
);
switch
(
status
)
{
case
ERROR_ACCESS_DENIED
:
return
STATUS_ACCESS_DENIED
;
...
...
dlls/rpcrt4/tests/ndr_marshall.c
View file @
e86eb8ef
...
...
@@ -1945,11 +1945,11 @@ static void test_ndr_buffer(void)
StubDesc
.
RpcInterfaceInformation
=
(
void
*
)
&
IFoo___RpcServerInterface
;
status
=
RpcServerUseProtseqEp
(
ncalrpc
,
20
,
endpoint
,
NULL
);
ok
(
RPC_S_OK
==
status
,
"RpcServerUseProtseqEp failed with status %
l
u
\n
"
,
status
);
ok
(
RPC_S_OK
==
status
,
"RpcServerUseProtseqEp failed with status %u
\n
"
,
status
);
status
=
RpcServerRegisterIf
(
IFoo_v0_0_s_ifspec
,
NULL
,
NULL
);
ok
(
RPC_S_OK
==
status
,
"RpcServerRegisterIf failed with status %
l
u
\n
"
,
status
);
ok
(
RPC_S_OK
==
status
,
"RpcServerRegisterIf failed with status %u
\n
"
,
status
);
status
=
RpcServerListen
(
1
,
20
,
TRUE
);
ok
(
RPC_S_OK
==
status
,
"RpcServerListen failed with status %
l
u
\n
"
,
status
);
ok
(
RPC_S_OK
==
status
,
"RpcServerListen failed with status %u
\n
"
,
status
);
if
(
status
!=
RPC_S_OK
)
{
/* Failed to create a server, running client tests is useless */
...
...
@@ -1957,10 +1957,10 @@ static void test_ndr_buffer(void)
}
status
=
RpcStringBindingCompose
(
NULL
,
ncalrpc
,
NULL
,
endpoint
,
NULL
,
&
binding
);
ok
(
status
==
RPC_S_OK
,
"RpcStringBindingCompose failed (%
l
u)
\n
"
,
status
);
ok
(
status
==
RPC_S_OK
,
"RpcStringBindingCompose failed (%u)
\n
"
,
status
);
status
=
RpcBindingFromStringBinding
(
binding
,
&
Handle
);
ok
(
status
==
RPC_S_OK
,
"RpcBindingFromStringBinding failed (%
l
u)
\n
"
,
status
);
ok
(
status
==
RPC_S_OK
,
"RpcBindingFromStringBinding failed (%u)
\n
"
,
status
);
RpcStringFree
(
&
binding
);
NdrClientInitializeNew
(
&
RpcMessage
,
&
StubMsg
,
&
StubDesc
,
5
);
...
...
@@ -2003,7 +2003,7 @@ todo_wine
RpcBindingFree
(
&
Handle
);
status
=
RpcServerUnregisterIf
(
NULL
,
NULL
,
FALSE
);
ok
(
status
==
RPC_S_OK
,
"RpcServerUnregisterIf failed (%
l
u)
\n
"
,
status
);
ok
(
status
==
RPC_S_OK
,
"RpcServerUnregisterIf failed (%u)
\n
"
,
status
);
}
static
void
test_NdrMapCommAndFaultStatus
(
void
)
...
...
@@ -2022,7 +2022,7 @@ static void test_NdrMapCommAndFaultStatus(void)
ULONG
expected_comm_status
=
0
;
ULONG
expected_fault_status
=
0
;
status
=
NdrMapCommAndFaultStatus
(
&
StubMsg
,
&
comm_status
,
&
fault_status
,
rpc_status
);
ok
(
status
==
RPC_S_OK
,
"NdrMapCommAndFaultStatus failed with error %
l
d
\n
"
,
status
);
ok
(
status
==
RPC_S_OK
,
"NdrMapCommAndFaultStatus failed with error %d
\n
"
,
status
);
switch
(
rpc_status
)
{
case
ERROR_INVALID_HANDLE
:
...
...
@@ -2042,9 +2042,9 @@ static void test_NdrMapCommAndFaultStatus(void)
default:
expected_fault_status
=
rpc_status
;
}
ok
(
comm_status
==
expected_comm_status
,
"NdrMapCommAndFaultStatus should have mapped %
l
d to comm status %d instead of %d
\n
"
,
ok
(
comm_status
==
expected_comm_status
,
"NdrMapCommAndFaultStatus should have mapped %d to comm status %d instead of %d
\n
"
,
rpc_status
,
expected_comm_status
,
comm_status
);
ok
(
fault_status
==
expected_fault_status
,
"NdrMapCommAndFaultStatus should have mapped %
l
d to fault status %d instead of %d
\n
"
,
ok
(
fault_status
==
expected_fault_status
,
"NdrMapCommAndFaultStatus should have mapped %d to fault status %d instead of %d
\n
"
,
rpc_status
,
expected_fault_status
,
fault_status
);
}
}
...
...
dlls/rpcrt4/tests/rpc.c
View file @
e86eb8ef
...
...
@@ -224,68 +224,68 @@ static void test_rpc_ncacn_ip_tcp(void)
status
=
RpcMgmtStopServerListening
(
NULL
);
todo_wine
{
ok
(
status
==
RPC_S_NOT_LISTENING
,
"wrong RpcMgmtStopServerListening error (%
l
u)
\n
"
,
status
);
"wrong RpcMgmtStopServerListening error (%u)
\n
"
,
status
);
}
status
=
RpcMgmtWaitServerListen
();
ok
(
status
==
RPC_S_NOT_LISTENING
,
"wrong RpcMgmtWaitServerListen error status (%
l
u)
\n
"
,
status
);
"wrong RpcMgmtWaitServerListen error status (%u)
\n
"
,
status
);
status
=
RpcServerListen
(
1
,
20
,
FALSE
);
ok
(
status
==
RPC_S_NO_PROTSEQS_REGISTERED
,
"wrong RpcServerListen error (%
l
u)
\n
"
,
status
);
"wrong RpcServerListen error (%u)
\n
"
,
status
);
status
=
RpcServerUseProtseqEp
(
ncacn_ip_tcp
,
20
,
endpoint
,
NULL
);
ok
(
status
==
RPC_S_OK
,
"RpcServerUseProtseqEp failed (%
l
u)
\n
"
,
status
);
ok
(
status
==
RPC_S_OK
,
"RpcServerUseProtseqEp failed (%u)
\n
"
,
status
);
status
=
RpcServerRegisterIf
(
IFoo_v0_0_s_ifspec
,
NULL
,
NULL
);
ok
(
status
==
RPC_S_OK
,
"RpcServerRegisterIf failed (%
l
u)
\n
"
,
status
);
ok
(
status
==
RPC_S_OK
,
"RpcServerRegisterIf failed (%u)
\n
"
,
status
);
status
=
RpcServerListen
(
1
,
20
,
TRUE
);
todo_wine
{
ok
(
status
==
RPC_S_OK
,
"RpcServerListen failed (%
l
u)
\n
"
,
status
);
ok
(
status
==
RPC_S_OK
,
"RpcServerListen failed (%u)
\n
"
,
status
);
}
status
=
RpcServerListen
(
1
,
20
,
TRUE
);
todo_wine
{
ok
(
status
==
RPC_S_ALREADY_LISTENING
,
"wrong RpcServerListen error (%
l
u)
\n
"
,
status
);
"wrong RpcServerListen error (%u)
\n
"
,
status
);
}
status
=
RpcStringBindingCompose
(
NULL
,
ncacn_ip_tcp
,
address
,
endpoint
,
NULL
,
&
binding
);
ok
(
status
==
RPC_S_OK
,
"RpcStringBindingCompose failed (%
l
u)
\n
"
,
status
);
ok
(
status
==
RPC_S_OK
,
"RpcStringBindingCompose failed (%u)
\n
"
,
status
);
status
=
RpcBindingFromStringBinding
(
binding
,
&
IFoo_IfHandle
);
ok
(
status
==
RPC_S_OK
,
"RpcBindingFromStringBinding failed (%
l
u)
\n
"
,
ok
(
status
==
RPC_S_OK
,
"RpcBindingFromStringBinding failed (%u)
\n
"
,
status
);
status
=
RpcBindingSetAuthInfo
(
IFoo_IfHandle
,
NULL
,
RPC_C_AUTHN_LEVEL_NONE
,
RPC_C_AUTHN_WINNT
,
NULL
,
RPC_C_AUTHZ_NAME
);
ok
(
status
==
RPC_S_OK
||
broken
(
status
==
RPC_S_UNKNOWN_AUTHN_SERVICE
),
/* win9x */
"RpcBindingSetAuthInfo failed (%
l
u)
\n
"
,
status
);
"RpcBindingSetAuthInfo failed (%u)
\n
"
,
status
);
status
=
RpcMgmtStopServerListening
(
NULL
);
ok
(
status
==
RPC_S_OK
,
"RpcMgmtStopServerListening failed (%
l
u)
\n
"
,
ok
(
status
==
RPC_S_OK
,
"RpcMgmtStopServerListening failed (%u)
\n
"
,
status
);
status
=
RpcMgmtStopServerListening
(
NULL
);
ok
(
status
==
RPC_S_OK
,
"RpcMgmtStopServerListening failed (%
l
u)
\n
"
,
ok
(
status
==
RPC_S_OK
,
"RpcMgmtStopServerListening failed (%u)
\n
"
,
status
);
status
=
RpcServerUnregisterIf
(
NULL
,
NULL
,
FALSE
);
ok
(
status
==
RPC_S_OK
,
"RpcServerUnregisterIf failed (%
l
u)
\n
"
,
status
);
ok
(
status
==
RPC_S_OK
,
"RpcServerUnregisterIf failed (%u)
\n
"
,
status
);
status
=
RpcMgmtWaitServerListen
();
todo_wine
{
ok
(
status
==
RPC_S_OK
,
"RpcMgmtWaitServerListen failed (%
l
u)
\n
"
,
status
);
ok
(
status
==
RPC_S_OK
,
"RpcMgmtWaitServerListen failed (%u)
\n
"
,
status
);
}
status
=
RpcStringFree
(
&
binding
);
ok
(
status
==
RPC_S_OK
,
"RpcStringFree failed (%
l
u)
\n
"
,
status
);
ok
(
status
==
RPC_S_OK
,
"RpcStringFree failed (%u)
\n
"
,
status
);
status
=
RpcBindingFree
(
&
IFoo_IfHandle
);
ok
(
status
==
RPC_S_OK
,
"RpcBindingFree failed (%
l
u)
\n
"
,
status
);
ok
(
status
==
RPC_S_OK
,
"RpcBindingFree failed (%u)
\n
"
,
status
);
}
/* this is what's generated with MS/RPC - it includes an extra 2
...
...
@@ -331,7 +331,7 @@ static void test_towers(void)
ret
=
TowerConstruct
(
&
mapi_if_id
,
&
ndr_syntax
,
"ncacn_ip_tcp"
,
"135"
,
"10.0.0.1"
,
&
tower
);
ok
(
ret
==
RPC_S_OK
||
broken
(
ret
==
RPC_S_INVALID_RPC_PROTSEQ
),
/* Vista */
"TowerConstruct failed with error %
l
d
\n
"
,
ret
);
"TowerConstruct failed with error %d
\n
"
,
ret
);
if
(
ret
==
RPC_S_INVALID_RPC_PROTSEQ
)
{
/* Windows Vista fails with this error and crashes if we continue */
...
...
@@ -364,7 +364,7 @@ static void test_towers(void)
}
ret
=
TowerExplode
(
tower
,
&
object
,
&
syntax
,
&
protseq
,
&
endpoint
,
&
address
);
ok
(
ret
==
RPC_S_OK
,
"TowerExplode failed with error %
l
d
\n
"
,
ret
);
ok
(
ret
==
RPC_S_OK
,
"TowerExplode failed with error %d
\n
"
,
ret
);
ok
(
!
memcmp
(
&
object
,
&
mapi_if_id
,
sizeof
(
mapi_if_id
)),
"object id didn't match
\n
"
);
ok
(
!
memcmp
(
&
syntax
,
&
ndr_syntax
,
sizeof
(
syntax
)),
"syntax id didn't match
\n
"
);
ok
(
!
strcmp
(
protseq
,
"ncacn_ip_tcp"
),
"protseq was
\"
%s
\"
instead of
\"
ncacn_ip_tcp
\"\n
"
,
protseq
);
...
...
@@ -376,15 +376,15 @@ static void test_towers(void)
I_RpcFree
(
address
);
ret
=
TowerExplode
(
tower
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
);
ok
(
ret
==
RPC_S_OK
,
"TowerExplode failed with error %
l
d
\n
"
,
ret
);
ok
(
ret
==
RPC_S_OK
,
"TowerExplode failed with error %d
\n
"
,
ret
);
I_RpcFree
(
tower
);
/* test the behaviour for ip_tcp with name instead of dotted IP notation */
ret
=
TowerConstruct
(
&
mapi_if_id
,
&
ndr_syntax
,
"ncacn_ip_tcp"
,
"135"
,
"localhost"
,
&
tower
);
ok
(
ret
==
RPC_S_OK
,
"TowerConstruct failed with error %
l
d
\n
"
,
ret
);
ok
(
ret
==
RPC_S_OK
,
"TowerConstruct failed with error %d
\n
"
,
ret
);
ret
=
TowerExplode
(
tower
,
NULL
,
NULL
,
NULL
,
NULL
,
&
address
);
ok
(
ret
==
RPC_S_OK
,
"TowerExplode failed with error %
l
d
\n
"
,
ret
);
ok
(
ret
==
RPC_S_OK
,
"TowerExplode failed with error %d
\n
"
,
ret
);
ok
(
!
strcmp
(
address
,
"0.0.0.0"
)
||
broken
(
!
strcmp
(
address
,
"255.255.255.255"
)),
"address was
\"
%s
\"
instead of
\"
0.0.0.0
\"\n
"
,
address
);
...
...
@@ -394,11 +394,11 @@ static void test_towers(void)
/* test the behaviour for np with no address */
ret
=
TowerConstruct
(
&
mapi_if_id
,
&
ndr_syntax
,
"ncacn_np"
,
"
\\
pipe
\\
test"
,
NULL
,
&
tower
);
ok
(
ret
==
RPC_S_OK
,
"TowerConstruct failed with error %
l
d
\n
"
,
ret
);
ok
(
ret
==
RPC_S_OK
,
"TowerConstruct failed with error %d
\n
"
,
ret
);
ret
=
TowerExplode
(
tower
,
NULL
,
NULL
,
NULL
,
NULL
,
&
address
);
ok
(
ret
==
RPC_S_OK
||
broken
(
ret
!=
RPC_S_OK
),
/* win2k, indeterminate */
"TowerExplode failed with error %
l
d
\n
"
,
ret
);
"TowerExplode failed with error %d
\n
"
,
ret
);
/* Windows XP SP3 sets address to NULL */
ok
(
!
address
||
!
strcmp
(
address
,
""
),
"address was
\"
%s
\"
instead of
\"\"
or NULL (XP SP3)
\n
"
,
address
);
...
...
@@ -556,7 +556,7 @@ static void test_I_RpcMapWin32Status(void)
ok
(
win32status
==
expected_win32status
||
broken
(
missing
&&
win32status
==
rpc_status
),
"I_RpcMapWin32Status(%
l
d) should have returned 0x%x instead of 0x%x%s
\n
"
,
"I_RpcMapWin32Status(%d) should have returned 0x%x instead of 0x%x%s
\n
"
,
rpc_status
,
expected_win32status
,
win32status
,
broken
(
missing
)
?
" (or have returned with the given status)"
:
""
);
}
...
...
@@ -578,7 +578,7 @@ static void test_RpcStringBindingParseA(void)
/* test all parameters */
status
=
RpcStringBindingParseA
(
valid_binding
,
&
uuid
,
&
protseq
,
&
network_addr
,
&
endpoint
,
&
options
);
ok
(
status
==
RPC_S_OK
,
"RpcStringBindingParseA failed with error %
l
d
\n
"
,
status
);
ok
(
status
==
RPC_S_OK
,
"RpcStringBindingParseA failed with error %d
\n
"
,
status
);
ok
(
!
strcmp
((
char
*
)
uuid
,
"00000000-0000-0000-c000-000000000046"
),
"uuid should have been 00000000-0000-0000-C000-000000000046 instead of %s
\n
"
,
uuid
);
ok
(
!
strcmp
((
char
*
)
protseq
,
"ncacn_np"
),
"protseq should have been ncacn_np instead of %s
\n
"
,
protseq
);
ok
(
!
strcmp
((
char
*
)
network_addr
,
"."
),
"network_addr should have been . instead of %s
\n
"
,
network_addr
);
...
...
@@ -593,7 +593,7 @@ static void test_RpcStringBindingParseA(void)
/* test all parameters with different type of string binding */
status
=
RpcStringBindingParseA
(
valid_binding2
,
&
uuid
,
&
protseq
,
&
network_addr
,
&
endpoint
,
&
options
);
ok
(
status
==
RPC_S_OK
,
"RpcStringBindingParseA failed with error %
l
d
\n
"
,
status
);
ok
(
status
==
RPC_S_OK
,
"RpcStringBindingParseA failed with error %d
\n
"
,
status
);
ok
(
!
strcmp
((
char
*
)
uuid
,
"00000000-0000-0000-c000-000000000046"
),
"uuid should have been 00000000-0000-0000-C000-000000000046 instead of %s
\n
"
,
uuid
);
ok
(
!
strcmp
((
char
*
)
protseq
,
"ncacn_np"
),
"protseq should have been ncacn_np instead of %s
\n
"
,
protseq
);
ok
(
!
strcmp
((
char
*
)
network_addr
,
"."
),
"network_addr should have been . instead of %s
\n
"
,
network_addr
);
...
...
@@ -608,24 +608,24 @@ static void test_RpcStringBindingParseA(void)
/* test with as many parameters NULL as possible */
status
=
RpcStringBindingParseA
(
valid_binding
,
NULL
,
&
protseq
,
NULL
,
NULL
,
NULL
);
ok
(
status
==
RPC_S_OK
,
"RpcStringBindingParseA failed with error %
l
d
\n
"
,
status
);
ok
(
status
==
RPC_S_OK
,
"RpcStringBindingParseA failed with error %d
\n
"
,
status
);
ok
(
!
strcmp
((
char
*
)
protseq
,
"ncacn_np"
),
"protseq should have been ncacn_np instead of %s
\n
"
,
protseq
);
RpcStringFreeA
(
&
protseq
);
/* test with invalid uuid */
status
=
RpcStringBindingParseA
(
invalid_uuid_binding
,
NULL
,
&
protseq
,
NULL
,
NULL
,
NULL
);
ok
(
status
==
RPC_S_INVALID_STRING_UUID
,
"RpcStringBindingParseA should have returned RPC_S_INVALID_STRING_UUID instead of %
l
d
\n
"
,
status
);
ok
(
status
==
RPC_S_INVALID_STRING_UUID
,
"RpcStringBindingParseA should have returned RPC_S_INVALID_STRING_UUID instead of %d
\n
"
,
status
);
ok
(
protseq
==
NULL
,
"protseq was %p instead of NULL
\n
"
,
protseq
);
/* test with invalid endpoint */
status
=
RpcStringBindingParseA
(
invalid_ep_binding
,
NULL
,
&
protseq
,
NULL
,
NULL
,
NULL
);
ok
(
status
==
RPC_S_OK
,
"RpcStringBindingParseA failed with error %
l
d
\n
"
,
status
);
ok
(
status
==
RPC_S_OK
,
"RpcStringBindingParseA failed with error %d
\n
"
,
status
);
RpcStringFreeA
(
&
protseq
);
/* test with invalid binding */
status
=
RpcStringBindingParseA
(
invalid_binding
,
&
uuid
,
&
protseq
,
&
network_addr
,
&
endpoint
,
&
options
);
todo_wine
ok
(
status
==
RPC_S_INVALID_STRING_BINDING
,
"RpcStringBindingParseA should have returned RPC_S_INVALID_STRING_BINDING instead of %
l
d
\n
"
,
status
);
ok
(
status
==
RPC_S_INVALID_STRING_BINDING
,
"RpcStringBindingParseA should have returned RPC_S_INVALID_STRING_BINDING instead of %d
\n
"
,
status
);
todo_wine
ok
(
uuid
==
NULL
,
"uuid was %p instead of NULL
\n
"
,
uuid
);
ok
(
protseq
==
NULL
,
"protseq was %p instead of NULL
\n
"
,
protseq
);
...
...
@@ -691,49 +691,49 @@ static void test_endpoint_mapper(RPC_CSTR protseq, RPC_CSTR address,
status
=
RpcServerUseProtseqEp
(
protseq
,
20
,
endpoint
,
NULL
);
ok
(
status
==
RPC_S_OK
||
broken
(
status
==
RPC_S_PROTSEQ_NOT_SUPPORTED
),
/* win9x */
"%s: RpcServerUseProtseqEp failed (%
l
u)
\n
"
,
protseq
,
status
);
"%s: RpcServerUseProtseqEp failed (%u)
\n
"
,
protseq
,
status
);
status
=
RpcServerRegisterIf
(
IFoo_v0_0_s_ifspec
,
NULL
,
NULL
);
ok
(
status
==
RPC_S_OK
,
"%s: RpcServerRegisterIf failed (%
l
u)
\n
"
,
protseq
,
status
);
ok
(
status
==
RPC_S_OK
,
"%s: RpcServerRegisterIf failed (%u)
\n
"
,
protseq
,
status
);
status
=
RpcServerInqBindings
(
&
binding_vector
);
ok
(
status
==
RPC_S_OK
,
"%s: RpcServerInqBindings failed with error %
l
u
\n
"
,
protseq
,
status
);
ok
(
status
==
RPC_S_OK
,
"%s: RpcServerInqBindings failed with error %u
\n
"
,
protseq
,
status
);
status
=
RpcEpRegisterA
(
IFoo_v0_0_s_ifspec
,
binding_vector
,
NULL
,
annotation
);
ok
(
status
==
RPC_S_OK
,
"%s: RpcEpRegisterA failed with error %
l
u
\n
"
,
protseq
,
status
);
ok
(
status
==
RPC_S_OK
,
"%s: RpcEpRegisterA failed with error %u
\n
"
,
protseq
,
status
);
status
=
RpcStringBindingCompose
(
NULL
,
protseq
,
address
,
NULL
,
NULL
,
&
binding
);
ok
(
status
==
RPC_S_OK
,
"%s: RpcStringBindingCompose failed (%
l
u)
\n
"
,
protseq
,
status
);
ok
(
status
==
RPC_S_OK
,
"%s: RpcStringBindingCompose failed (%u)
\n
"
,
protseq
,
status
);
status
=
RpcBindingFromStringBinding
(
binding
,
&
handle
);
ok
(
status
==
RPC_S_OK
,
"%s: RpcBindingFromStringBinding failed (%
l
u)
\n
"
,
protseq
,
status
);
ok
(
status
==
RPC_S_OK
,
"%s: RpcBindingFromStringBinding failed (%u)
\n
"
,
protseq
,
status
);
RpcStringFree
(
&
binding
);
status
=
RpcBindingReset
(
handle
);
ok
(
status
==
RPC_S_OK
,
"%s: RpcBindingReset failed with error %
l
u
\n
"
,
protseq
,
status
);
ok
(
status
==
RPC_S_OK
,
"%s: RpcBindingReset failed with error %u
\n
"
,
protseq
,
status
);
RpcStringFree
(
&
binding
);
status
=
RpcEpResolveBinding
(
handle
,
IFoo_v0_0_s_ifspec
);
ok
(
status
==
RPC_S_OK
||
broken
(
status
==
RPC_S_SERVER_UNAVAILABLE
),
/* win9x */
"%s: RpcEpResolveBinding failed with error %
l
u
\n
"
,
protseq
,
status
);
"%s: RpcEpResolveBinding failed with error %u
\n
"
,
protseq
,
status
);
status
=
RpcBindingReset
(
handle
);
ok
(
status
==
RPC_S_OK
,
"%s: RpcBindingReset failed with error %
l
u
\n
"
,
protseq
,
status
);
ok
(
status
==
RPC_S_OK
,
"%s: RpcBindingReset failed with error %u
\n
"
,
protseq
,
status
);
status
=
RpcBindingFree
(
&
handle
);
ok
(
status
==
RPC_S_OK
,
"%s: RpcBindingFree failed with error %
l
u
\n
"
,
protseq
,
status
);
ok
(
status
==
RPC_S_OK
,
"%s: RpcBindingFree failed with error %u
\n
"
,
protseq
,
status
);
status
=
RpcServerUnregisterIf
(
NULL
,
NULL
,
FALSE
);
ok
(
status
==
RPC_S_OK
,
"%s: RpcServerUnregisterIf failed (%
l
u)
\n
"
,
protseq
,
status
);
ok
(
status
==
RPC_S_OK
,
"%s: RpcServerUnregisterIf failed (%u)
\n
"
,
protseq
,
status
);
status
=
RpcEpUnregister
(
IFoo_v0_0_s_ifspec
,
binding_vector
,
NULL
);
ok
(
status
==
RPC_S_OK
,
"%s: RpcEpUnregisterA failed with error %
l
u
\n
"
,
protseq
,
status
);
ok
(
status
==
RPC_S_OK
,
"%s: RpcEpUnregisterA failed with error %u
\n
"
,
protseq
,
status
);
status
=
RpcBindingVectorFree
(
&
binding_vector
);
ok
(
status
==
RPC_S_OK
,
"%s: RpcBindingVectorFree failed with error %
l
u
\n
"
,
protseq
,
status
);
ok
(
status
==
RPC_S_OK
,
"%s: RpcBindingVectorFree failed with error %u
\n
"
,
protseq
,
status
);
}
static
void
test_RpcStringBindingFromBinding
(
void
)
...
...
@@ -747,21 +747,21 @@ static void test_RpcStringBindingFromBinding(void)
status
=
RpcStringBindingCompose
(
NULL
,
ncacn_np
,
address
,
endpoint
,
NULL
,
&
binding
);
ok
(
status
==
RPC_S_OK
,
"RpcStringBindingCompose failed (%
l
u)
\n
"
,
status
);
ok
(
status
==
RPC_S_OK
,
"RpcStringBindingCompose failed (%u)
\n
"
,
status
);
status
=
RpcBindingFromStringBinding
(
binding
,
&
handle
);
ok
(
status
==
RPC_S_OK
,
"RpcBindingFromStringBinding failed (%
l
u)
\n
"
,
status
);
ok
(
status
==
RPC_S_OK
,
"RpcBindingFromStringBinding failed (%u)
\n
"
,
status
);
RpcStringFree
(
&
binding
);
status
=
RpcBindingToStringBinding
(
handle
,
&
binding
);
ok
(
status
==
RPC_S_OK
,
"RpcStringBindingFromBinding failed with error %
l
u
\n
"
,
status
);
ok
(
status
==
RPC_S_OK
,
"RpcStringBindingFromBinding failed with error %u
\n
"
,
status
);
ok
(
!
strcmp
((
const
char
*
)
binding
,
"ncacn_np:.[
\\\\
pipe
\\\\
wine_rpc_test]"
),
"binding string didn't match what was expected:
\"
%s
\"\n
"
,
binding
);
RpcStringFree
(
&
binding
);
status
=
RpcBindingFree
(
&
handle
);
ok
(
status
==
RPC_S_OK
,
"RpcBindingFree failed with error %
l
u
\n
"
,
status
);
ok
(
status
==
RPC_S_OK
,
"RpcBindingFree failed with error %u
\n
"
,
status
);
}
static
char
*
printGuid
(
char
*
buf
,
const
UUID
*
guid
)
...
...
dlls/rpcrt4/tests/rpc_async.c
View file @
e86eb8ef
...
...
@@ -36,14 +36,14 @@ static void test_RpcAsyncInitializeHandle(void)
int
i
;
status
=
pRpcAsyncInitializeHandle
((
PRPC_ASYNC_STATE
)
buffer
,
sizeof
(
buffer
));
ok
(
status
==
ERROR_INVALID_PARAMETER
,
"RpcAsyncInitializeHandle with large Size should have returned ERROR_INVALID_PARAMETER instead of %
l
d
\n
"
,
status
);
ok
(
status
==
ERROR_INVALID_PARAMETER
,
"RpcAsyncInitializeHandle with large Size should have returned ERROR_INVALID_PARAMETER instead of %d
\n
"
,
status
);
status
=
pRpcAsyncInitializeHandle
(
&
async
,
sizeof
(
async
)
-
1
);
ok
(
status
==
ERROR_INVALID_PARAMETER
,
"RpcAsyncInitializeHandle with small Size should have returned ERROR_INVALID_PARAMETER instead of %
l
d
\n
"
,
status
);
ok
(
status
==
ERROR_INVALID_PARAMETER
,
"RpcAsyncInitializeHandle with small Size should have returned ERROR_INVALID_PARAMETER instead of %d
\n
"
,
status
);
memset
(
&
async
,
0xcc
,
sizeof
(
async
));
status
=
pRpcAsyncInitializeHandle
(
&
async
,
sizeof
(
async
));
ok
(
status
==
RPC_S_OK
,
"RpcAsyncInitializeHandle failed with error %
l
d
\n
"
,
status
);
ok
(
status
==
RPC_S_OK
,
"RpcAsyncInitializeHandle failed with error %d
\n
"
,
status
);
ok
(
async
.
Size
==
sizeof
(
async
),
"async.Size wrong: %d
\n
"
,
async
.
Size
);
ok
(
async
.
Signature
==
0x43595341
,
"async.Signature should be 0x43595341, but is 0x%x instead
\n
"
,
async
.
Signature
);
...
...
@@ -64,16 +64,16 @@ static void test_RpcAsyncGetCallStatus(void)
RPC_STATUS
status
;
status
=
pRpcAsyncInitializeHandle
(
&
async
,
sizeof
(
async
));
ok
(
status
==
RPC_S_OK
,
"RpcAsyncInitializeHandle failed with error %
l
d
\n
"
,
status
);
ok
(
status
==
RPC_S_OK
,
"RpcAsyncInitializeHandle failed with error %d
\n
"
,
status
);
status
=
pRpcAsyncGetCallStatus
(
&
async
);
todo_wine
ok
(
status
==
RPC_S_INVALID_BINDING
,
"RpcAsyncGetCallStatus should have returned RPC_S_INVALID_BINDING instead of %
l
d
\n
"
,
status
);
ok
(
status
==
RPC_S_INVALID_BINDING
,
"RpcAsyncGetCallStatus should have returned RPC_S_INVALID_BINDING instead of %d
\n
"
,
status
);
memset
(
&
async
,
0
,
sizeof
(
async
));
status
=
pRpcAsyncGetCallStatus
(
&
async
);
todo_wine
ok
(
status
==
RPC_S_INVALID_BINDING
,
"RpcAsyncGetCallStatus should have returned RPC_S_INVALID_BINDING instead of %
l
d
\n
"
,
status
);
ok
(
status
==
RPC_S_INVALID_BINDING
,
"RpcAsyncGetCallStatus should have returned RPC_S_INVALID_BINDING instead of %d
\n
"
,
status
);
}
START_TEST
(
rpc_async
)
...
...
dlls/rpcrt4/tests/server.c
View file @
e86eb8ef
...
...
@@ -1294,12 +1294,12 @@ server(void)
DWORD
ret
;
iptcp_status
=
RpcServerUseProtseqEp
(
iptcp
,
20
,
port
,
NULL
);
ok
(
iptcp_status
==
RPC_S_OK
,
"RpcServerUseProtseqEp(ncacn_ip_tcp) failed with status %
l
d
\n
"
,
iptcp_status
);
ok
(
iptcp_status
==
RPC_S_OK
,
"RpcServerUseProtseqEp(ncacn_ip_tcp) failed with status %d
\n
"
,
iptcp_status
);
np_status
=
RpcServerUseProtseqEp
(
np
,
0
,
pipe
,
NULL
);
if
(
np_status
==
RPC_S_PROTSEQ_NOT_SUPPORTED
)
skip
(
"Protocol sequence ncacn_np is not supported
\n
"
);
else
ok
(
np_status
==
RPC_S_OK
,
"RpcServerUseProtseqEp(ncacn_np) failed with status %
l
d
\n
"
,
np_status
);
ok
(
np_status
==
RPC_S_OK
,
"RpcServerUseProtseqEp(ncacn_np) failed with status %d
\n
"
,
np_status
);
if
(
pRpcServerRegisterIfEx
)
{
...
...
@@ -1310,9 +1310,9 @@ server(void)
}
else
status
=
RpcServerRegisterIf
(
s_IServer_v0_0_s_ifspec
,
NULL
,
NULL
);
ok
(
status
==
RPC_S_OK
,
"RpcServerRegisterIf failed with status %
l
d
\n
"
,
status
);
ok
(
status
==
RPC_S_OK
,
"RpcServerRegisterIf failed with status %d
\n
"
,
status
);
status
=
RpcServerListen
(
1
,
20
,
TRUE
);
ok
(
status
==
RPC_S_OK
,
"RpcServerListen failed with status %
l
d
\n
"
,
status
);
ok
(
status
==
RPC_S_OK
,
"RpcServerListen failed with status %d
\n
"
,
status
);
stop_event
=
CreateEvent
(
NULL
,
FALSE
,
FALSE
,
NULL
);
ok
(
stop_event
!=
NULL
,
"CreateEvent failed with error %d
\n
"
,
GetLastError
());
...
...
@@ -1338,7 +1338,7 @@ server(void)
{
status
=
RpcMgmtWaitServerListen
();
todo_wine
{
ok
(
status
==
RPC_S_OK
,
"RpcMgmtWaitServerListening failed with status %
l
d
\n
"
,
status
);
ok
(
status
==
RPC_S_OK
,
"RpcMgmtWaitServerListening failed with status %d
\n
"
,
status
);
}
}
}
...
...
include/rpc.h
View file @
e86eb8ef
...
...
@@ -51,7 +51,7 @@
#define __RPC_STUB __stdcall
#define RPC_ENTRY __stdcall
#define RPCRTAPI
typedef
long
RPC_STATUS
;
typedef
LONG
RPC_STATUS
;
typedef
void
*
I_RPC_HANDLE
;
...
...
programs/rpcss/epmp.c
View file @
e86eb8ef
...
...
@@ -120,7 +120,7 @@ void ept_insert(handle_t h,
&
entry
->
address
);
if
(
rpc_status
!=
RPC_S_OK
)
{
WINE_WARN
(
"TowerExplode failed %
l
u
\n
"
,
rpc_status
);
WINE_WARN
(
"TowerExplode failed %u
\n
"
,
rpc_status
);
*
status
=
rpc_status
;
break
;
/* FIXME: more cleanup? */
}
...
...
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