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
06246aff
Commit
06246aff
authored
Nov 08, 2013
by
Jacek Caban
Committed by
Alexandre Julliard
Nov 08, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rpcrt4: Compile tests with -D__WINESRC__.
parent
a808f23c
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
65 additions
and
60 deletions
+65
-60
Makefile.in
dlls/rpcrt4/tests/Makefile.in
+0
-1
cstub.c
dlls/rpcrt4/tests/cstub.c
+1
-1
generated.c
dlls/rpcrt4/tests/generated.c
+1
-0
ndr_marshall.c
dlls/rpcrt4/tests/ndr_marshall.c
+6
-5
rpc.c
dlls/rpcrt4/tests/rpc.c
+23
-21
rpc_async.c
dlls/rpcrt4/tests/rpc_async.c
+1
-1
rpc_protseq.c
dlls/rpcrt4/tests/rpc_protseq.c
+12
-12
server.c
dlls/rpcrt4/tests/server.c
+20
-19
tests.dat
tools/winapi/tests.dat
+1
-0
No files found.
dlls/rpcrt4/tests/Makefile.in
View file @
06246aff
TESTDLL
=
rpcrt4.dll
IMPORTS
=
ole32 rpcrt4 advapi32
EXTRADEFS
=
-U__WINESRC__
-DWINE_STRICT_PROTOTYPES
-DWINE_NO_NAMELESS_EXTENSION
-DWIDL_C_INLINE_WRAPPERS
EXTRAIDLFLAGS
=
--prefix-server
=
s_
IDL_C_SRCS
=
server.idl
...
...
dlls/rpcrt4/tests/cstub.c
View file @
06246aff
...
...
@@ -29,8 +29,8 @@
#include <winnt.h>
#include <winerror.h>
#include "initguid.h"
#include <ole2.h>
#include "rpc.h"
#include "rpcdce.h"
#include "rpcproxy.h"
...
...
dlls/rpcrt4/tests/generated.c
View file @
06246aff
...
...
@@ -14,6 +14,7 @@
#include <stdarg.h>
#include "windef.h"
#include "winbase.h"
#include "ole2.h"
#include "rpc.h"
#include "rpcndr.h"
#include "rpcproxy.h"
...
...
dlls/rpcrt4/tests/ndr_marshall.c
View file @
06246aff
...
...
@@ -29,6 +29,7 @@
#include <winbase.h>
#include <winnt.h>
#include <winerror.h>
#include <ole2.h>
#include "rpc.h"
#include "rpcdce.h"
...
...
@@ -2092,7 +2093,7 @@ static void test_ndr_buffer(void)
StubDesc
.
RpcInterfaceInformation
=
(
void
*
)
&
IFoo___RpcServerInterface
;
status
=
RpcServerUseProtseqEp
(
ncalrpc
,
20
,
endpoint
,
NULL
);
status
=
RpcServerUseProtseqEp
A
(
ncalrpc
,
20
,
endpoint
,
NULL
);
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 %u
\n
"
,
status
);
...
...
@@ -2104,12 +2105,12 @@ static void test_ndr_buffer(void)
return
;
}
status
=
RpcStringBindingCompose
(
NULL
,
ncalrpc
,
NULL
,
endpoint
,
NULL
,
&
binding
);
status
=
RpcStringBindingCompose
A
(
NULL
,
ncalrpc
,
NULL
,
endpoint
,
NULL
,
&
binding
);
ok
(
status
==
RPC_S_OK
,
"RpcStringBindingCompose failed (%u)
\n
"
,
status
);
status
=
RpcBindingFromStringBinding
(
binding
,
&
Handle
);
status
=
RpcBindingFromStringBinding
A
(
binding
,
&
Handle
);
ok
(
status
==
RPC_S_OK
,
"RpcBindingFromStringBinding failed (%u)
\n
"
,
status
);
RpcStringFree
(
&
binding
);
RpcStringFree
A
(
&
binding
);
NdrClientInitializeNew
(
&
RpcMessage
,
&
StubMsg
,
&
StubDesc
,
5
);
...
...
@@ -2208,7 +2209,7 @@ static void test_NdrGetUserMarshalInfo(void)
RPC_MESSAGE
rpc_msg
;
RPC_STATUS
(
RPC_ENTRY
*
pNdrGetUserMarshalInfo
)(
ULONG
*
,
ULONG
,
NDR_USER_MARSHAL_INFO
*
);
pNdrGetUserMarshalInfo
=
(
void
*
)
GetProcAddress
(
GetModuleHandle
(
"rpcrt4.dll"
),
"NdrGetUserMarshalInfo"
);
pNdrGetUserMarshalInfo
=
(
void
*
)
GetProcAddress
(
GetModuleHandle
A
(
"rpcrt4.dll"
),
"NdrGetUserMarshalInfo"
);
if
(
!
pNdrGetUserMarshalInfo
)
{
skip
(
"NdrGetUserMarshalInfo not exported
\n
"
);
...
...
dlls/rpcrt4/tests/rpc.c
View file @
06246aff
...
...
@@ -28,6 +28,8 @@
#include <winbase.h>
#include <winnt.h>
#include <winerror.h>
#include <ole2.h>
#include <ntsecapi.h>
#include "rpc.h"
#include "rpcdce.h"
...
...
@@ -113,7 +115,7 @@ static void UuidConversionAndComparison(void) {
ok
(
(
UuidFromStringA
((
unsigned
char
*
)
str
,
&
Uuid1
)
==
RPC_S_INVALID_STRING_UUID
),
"Invalid UUID String
\n
"
);
str
[
i2
]
=
x
;
/* change it back so remaining tests are interesting. */
}
RpcStringFree
((
unsigned
char
**
)
&
str
);
RpcStringFree
A
((
unsigned
char
**
)
&
str
);
}
/* Uuid to String to Uuid (wchar) */
...
...
@@ -215,10 +217,10 @@ static void test_rpc_ncacn_ip_tcp(void)
static
unsigned
char
endpoint
[]
=
"4114"
;
static
unsigned
char
spn
[]
=
"principal"
;
status
=
RpcNetworkIsProtseqValid
(
foo
);
status
=
RpcNetworkIsProtseqValid
A
(
foo
);
ok
(
status
==
RPC_S_INVALID_RPC_PROTSEQ
,
"return wrong
\n
"
);
status
=
RpcNetworkIsProtseqValid
(
ncacn_ip_tcp
);
status
=
RpcNetworkIsProtseqValid
A
(
ncacn_ip_tcp
);
ok
(
status
==
RPC_S_OK
,
"return wrong
\n
"
);
status
=
RpcMgmtStopServerListening
(
NULL
);
...
...
@@ -235,7 +237,7 @@ todo_wine {
ok
(
status
==
RPC_S_NO_PROTSEQS_REGISTERED
,
"wrong RpcServerListen error (%u)
\n
"
,
status
);
status
=
RpcServerUseProtseqEp
(
ncacn_ip_tcp
,
20
,
endpoint
,
NULL
);
status
=
RpcServerUseProtseqEp
A
(
ncacn_ip_tcp
,
20
,
endpoint
,
NULL
);
ok
(
status
==
RPC_S_OK
,
"RpcServerUseProtseqEp failed (%u)
\n
"
,
status
);
status
=
RpcServerRegisterIf
(
IFoo_v0_0_s_ifspec
,
NULL
,
NULL
);
...
...
@@ -252,30 +254,30 @@ todo_wine {
"wrong RpcServerListen error (%u)
\n
"
,
status
);
}
status
=
RpcStringBindingCompose
(
NULL
,
ncacn_ip_tcp
,
address
,
status
=
RpcStringBindingCompose
A
(
NULL
,
ncacn_ip_tcp
,
address
,
endpoint
,
NULL
,
&
binding
);
ok
(
status
==
RPC_S_OK
,
"RpcStringBindingCompose failed (%u)
\n
"
,
status
);
status
=
RpcBindingFromStringBinding
(
binding
,
&
IFoo_IfHandle
);
status
=
RpcBindingFromStringBinding
A
(
binding
,
&
IFoo_IfHandle
);
ok
(
status
==
RPC_S_OK
,
"RpcBindingFromStringBinding failed (%u)
\n
"
,
status
);
status
=
RpcBindingSetAuthInfo
(
IFoo_IfHandle
,
NULL
,
RPC_C_AUTHN_LEVEL_NONE
,
status
=
RpcBindingSetAuthInfo
A
(
IFoo_IfHandle
,
NULL
,
RPC_C_AUTHN_LEVEL_NONE
,
RPC_C_AUTHN_WINNT
,
NULL
,
RPC_C_AUTHZ_NAME
);
ok
(
status
==
RPC_S_OK
,
"RpcBindingSetAuthInfo failed (%u)
\n
"
,
status
);
status
=
RpcBindingInqAuthInfo
(
IFoo_IfHandle
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
);
status
=
RpcBindingInqAuthInfo
A
(
IFoo_IfHandle
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
);
ok
(
status
==
RPC_S_BINDING_HAS_NO_AUTH
,
"RpcBindingInqAuthInfo failed (%u)
\n
"
,
status
);
status
=
RpcBindingSetAuthInfo
(
IFoo_IfHandle
,
spn
,
RPC_C_AUTHN_LEVEL_PKT_PRIVACY
,
status
=
RpcBindingSetAuthInfo
A
(
IFoo_IfHandle
,
spn
,
RPC_C_AUTHN_LEVEL_PKT_PRIVACY
,
RPC_C_AUTHN_WINNT
,
NULL
,
RPC_C_AUTHZ_NAME
);
ok
(
status
==
RPC_S_OK
,
"RpcBindingSetAuthInfo failed (%u)
\n
"
,
status
);
level
=
authnsvc
=
authzsvc
=
0
;
principal
=
(
unsigned
char
*
)
0xdeadbeef
;
identity
=
(
RPC_AUTH_IDENTITY_HANDLE
*
)
0xdeadbeef
;
status
=
RpcBindingInqAuthInfo
(
IFoo_IfHandle
,
&
principal
,
&
level
,
&
authnsvc
,
status
=
RpcBindingInqAuthInfo
A
(
IFoo_IfHandle
,
&
principal
,
&
level
,
&
authnsvc
,
&
identity
,
&
authzsvc
);
ok
(
status
==
RPC_S_OK
,
"RpcBindingInqAuthInfo failed (%u)
\n
"
,
status
);
...
...
@@ -284,7 +286,7 @@ todo_wine {
ok
(
level
==
RPC_C_AUTHN_LEVEL_PKT_PRIVACY
,
"expected RPC_C_AUTHN_LEVEL_PKT_PRIVACY, got %d
\n
"
,
level
);
ok
(
authnsvc
==
RPC_C_AUTHN_WINNT
,
"expected RPC_C_AUTHN_WINNT, got %d
\n
"
,
authnsvc
);
todo_wine
ok
(
authzsvc
==
RPC_C_AUTHZ_NAME
,
"expected RPC_C_AUTHZ_NAME, got %d
\n
"
,
authzsvc
);
if
(
status
==
RPC_S_OK
)
RpcStringFree
(
&
principal
);
if
(
status
==
RPC_S_OK
)
RpcStringFree
A
(
&
principal
);
status
=
RpcMgmtStopServerListening
(
NULL
);
ok
(
status
==
RPC_S_OK
,
"RpcMgmtStopServerListening failed (%u)
\n
"
,
...
...
@@ -302,7 +304,7 @@ todo_wine {
ok
(
status
==
RPC_S_OK
,
"RpcMgmtWaitServerListen failed (%u)
\n
"
,
status
);
}
status
=
RpcStringFree
(
&
binding
);
status
=
RpcStringFree
A
(
&
binding
);
ok
(
status
==
RPC_S_OK
,
"RpcStringFree failed (%u)
\n
"
,
status
);
status
=
RpcBindingFree
(
&
IFoo_IfHandle
);
...
...
@@ -659,7 +661,7 @@ static void test_I_RpcExceptionFilter(void)
{
ULONG
exception
;
int
retval
;
int
(
WINAPI
*
pI_RpcExceptionFilter
)(
ULONG
)
=
(
void
*
)
GetProcAddress
(
GetModuleHandle
(
"rpcrt4.dll"
),
"I_RpcExceptionFilter"
);
int
(
WINAPI
*
pI_RpcExceptionFilter
)(
ULONG
)
=
(
void
*
)
GetProcAddress
(
GetModuleHandle
A
(
"rpcrt4.dll"
),
"I_RpcExceptionFilter"
);
if
(
!
pI_RpcExceptionFilter
)
{
...
...
@@ -709,20 +711,20 @@ static void test_RpcStringBindingFromBinding(void)
handle_t
handle
;
RPC_CSTR
binding
;
status
=
RpcStringBindingCompose
(
NULL
,
ncacn_np
,
address
,
status
=
RpcStringBindingCompose
A
(
NULL
,
ncacn_np
,
address
,
endpoint
,
NULL
,
&
binding
);
ok
(
status
==
RPC_S_OK
,
"RpcStringBindingCompose failed (%u)
\n
"
,
status
);
status
=
RpcBindingFromStringBinding
(
binding
,
&
handle
);
status
=
RpcBindingFromStringBinding
A
(
binding
,
&
handle
);
ok
(
status
==
RPC_S_OK
,
"RpcBindingFromStringBinding failed (%u)
\n
"
,
status
);
RpcStringFree
(
&
binding
);
RpcStringFree
A
(
&
binding
);
status
=
RpcBindingToStringBinding
(
handle
,
&
binding
);
status
=
RpcBindingToStringBinding
A
(
handle
,
&
binding
);
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
);
RpcStringFree
A
(
&
binding
);
status
=
RpcBindingFree
(
&
handle
);
ok
(
status
==
RPC_S_OK
,
"RpcBindingFree failed with error %u
\n
"
,
status
);
...
...
@@ -798,7 +800,7 @@ static void test_UuidCreateSequential(void)
{
UUID
guid1
;
BYTE
version
;
RPC_STATUS
(
WINAPI
*
pUuidCreateSequential
)(
UUID
*
)
=
(
void
*
)
GetProcAddress
(
GetModuleHandle
(
"rpcrt4.dll"
),
"UuidCreateSequential"
);
RPC_STATUS
(
WINAPI
*
pUuidCreateSequential
)(
UUID
*
)
=
(
void
*
)
GetProcAddress
(
GetModuleHandle
A
(
"rpcrt4.dll"
),
"UuidCreateSequential"
);
RPC_STATUS
ret
;
if
(
!
pUuidCreateSequential
)
...
...
@@ -903,12 +905,12 @@ static void test_RpcServerInqDefaultPrincName(void)
ok
(
ret
==
RPC_S_OK
,
"got %u
\n
"
,
ret
);
ok
(
principal
!=
(
RPC_CSTR
)
0xdeadbeef
,
"expected valid principal
\n
"
);
ok
(
!
strcmp
(
(
const
char
*
)
principal
,
username
),
"got
\'
%s
\'\n
"
,
principal
);
RpcStringFree
(
&
principal
);
RpcStringFree
A
(
&
principal
);
ret
=
RpcServerRegisterAuthInfoA
(
saved_principal
,
RPC_C_AUTHN_WINNT
,
NULL
,
NULL
);
ok
(
ret
==
RPC_S_OK
,
"got %u
\n
"
,
ret
);
RpcStringFree
(
&
saved_principal
);
RpcStringFree
A
(
&
saved_principal
);
HeapFree
(
GetProcessHeap
(),
0
,
username
);
}
...
...
dlls/rpcrt4/tests/rpc_async.c
View file @
06246aff
...
...
@@ -80,7 +80,7 @@ static void test_RpcAsyncGetCallStatus(void)
START_TEST
(
rpc_async
)
{
HMODULE
hRpcRt4
=
GetModuleHandle
(
"rpcrt4.dll"
);
HMODULE
hRpcRt4
=
GetModuleHandle
A
(
"rpcrt4.dll"
);
pRpcAsyncInitializeHandle
=
(
void
*
)
GetProcAddress
(
hRpcRt4
,
"RpcAsyncInitializeHandle"
);
pRpcAsyncGetCallStatus
=
(
void
*
)
GetProcAddress
(
hRpcRt4
,
"RpcAsyncGetCallStatus"
);
if
(
!
pRpcAsyncInitializeHandle
||
!
pRpcAsyncGetCallStatus
)
...
...
dlls/rpcrt4/tests/rpc_protseq.c
View file @
06246aff
...
...
@@ -55,24 +55,24 @@ static void test_RpcServerUseProtseq(void)
/* show that RpcServerUseProtseqEp(..., NULL, ...) is the same as
* RpcServerUseProtseq(...) */
status
=
RpcServerUseProtseqEp
(
ncalrpc
,
0
,
NULL
,
NULL
);
status
=
RpcServerUseProtseqEp
A
(
ncalrpc
,
0
,
NULL
,
NULL
);
ok
(
status
==
RPC_S_OK
||
broken
(
status
==
RPC_S_INVALID_ENDPOINT_FORMAT
),
"RpcServerUseProtseqEp with NULL endpoint failed with status %d
\n
"
,
status
);
/* register protocol sequences without explicit endpoints */
status
=
RpcServerUseProtseq
(
np
,
0
,
NULL
);
status
=
RpcServerUseProtseq
A
(
np
,
0
,
NULL
);
if
(
status
==
RPC_S_PROTSEQ_NOT_SUPPORTED
)
win_skip
(
"ncacn_np not supported
\n
"
);
else
ok
(
status
==
RPC_S_OK
,
"RpcServerUseProtseq(ncacn_np) failed with status %d
\n
"
,
status
);
if
(
status
==
RPC_S_OK
)
endpoints_registered
++
;
status
=
RpcServerUseProtseq
(
iptcp
,
0
,
NULL
);
status
=
RpcServerUseProtseq
A
(
iptcp
,
0
,
NULL
);
ok
(
status
==
RPC_S_OK
,
"RpcServerUseProtseq(ncacn_ip_tcp) failed with status %d
\n
"
,
status
);
if
(
status
==
RPC_S_OK
)
endpoints_registered
++
;
status
=
RpcServerUseProtseq
(
ncalrpc
,
0
,
NULL
);
status
=
RpcServerUseProtseq
A
(
ncalrpc
,
0
,
NULL
);
ok
(
status
==
RPC_S_OK
,
"RpcServerUseProtseqEp(ncalrpc) failed with status %d
\n
"
,
status
);
if
(
status
==
RPC_S_OK
)
endpoints_registered
++
;
...
...
@@ -85,24 +85,24 @@ static void test_RpcServerUseProtseq(void)
for
(
i
=
0
;
i
<
bindings
->
Count
;
i
++
)
{
RPC_CSTR
str_bind
;
status
=
RpcBindingToStringBinding
(
bindings
->
BindingH
[
i
],
&
str_bind
);
status
=
RpcBindingToStringBinding
A
(
bindings
->
BindingH
[
i
],
&
str_bind
);
ok
(
status
==
RPC_S_OK
,
"RpcBindingToStringBinding failed with status %d
\n
"
,
status
);
trace
(
"string binding: %s
\n
"
,
str_bind
);
RpcStringFree
(
&
str_bind
);
RpcStringFree
A
(
&
str_bind
);
}
RpcBindingVectorFree
(
&
bindings
);
/* re-register - endpoints should be reused */
status
=
RpcServerUseProtseq
(
np
,
0
,
NULL
);
status
=
RpcServerUseProtseq
A
(
np
,
0
,
NULL
);
if
(
status
==
RPC_S_PROTSEQ_NOT_SUPPORTED
)
win_skip
(
"ncacn_np not supported
\n
"
);
else
ok
(
status
==
RPC_S_OK
,
"RpcServerUseProtseq(ncacn_np) failed with status %d
\n
"
,
status
);
status
=
RpcServerUseProtseq
(
iptcp
,
0
,
NULL
);
status
=
RpcServerUseProtseq
A
(
iptcp
,
0
,
NULL
);
ok
(
status
==
RPC_S_OK
,
"RpcServerUseProtseq(ncacn_ip_tcp) failed with status %d
\n
"
,
status
);
status
=
RpcServerUseProtseq
(
ncalrpc
,
0
,
NULL
);
status
=
RpcServerUseProtseq
A
(
ncalrpc
,
0
,
NULL
);
ok
(
status
==
RPC_S_OK
,
"RpcServerUseProtseqEp(ncalrpc) failed with status %d
\n
"
,
status
);
status
=
RpcServerInqBindings
(
&
bindings
);
...
...
@@ -161,14 +161,14 @@ static void test_endpoint_mapper(RPC_CSTR protseq, RPC_CSTR address)
status
=
RpcEpRegisterA
(
IFoo_v0_0_s_ifspec
,
binding_vector
,
NULL
,
NULL
);
ok
(
status
==
RPC_S_OK
,
"%s: RpcEpRegisterA failed with error %u
\n
"
,
protseq
,
status
);
status
=
RpcStringBindingCompose
(
NULL
,
protseq
,
address
,
status
=
RpcStringBindingCompose
A
(
NULL
,
protseq
,
address
,
NULL
,
NULL
,
&
binding
);
ok
(
status
==
RPC_S_OK
,
"%s: RpcStringBindingCompose failed (%u)
\n
"
,
protseq
,
status
);
status
=
RpcBindingFromStringBinding
(
binding
,
&
handle
);
status
=
RpcBindingFromStringBinding
A
(
binding
,
&
handle
);
ok
(
status
==
RPC_S_OK
,
"%s: RpcBindingFromStringBinding failed (%u)
\n
"
,
protseq
,
status
);
RpcStringFree
(
&
binding
);
RpcStringFree
A
(
&
binding
);
status
=
RpcBindingReset
(
handle
);
ok
(
status
==
RPC_S_OK
,
"%s: RpcBindingReset failed with error %u
\n
"
,
protseq
,
status
);
...
...
dlls/rpcrt4/tests/server.c
View file @
06246aff
...
...
@@ -19,6 +19,7 @@
*/
#include <windows.h>
#include <ole2.h>
#include <secext.h>
#include <rpcdce.h>
#include "wine/test.h"
...
...
@@ -1492,58 +1493,58 @@ client(const char *test)
if
(
strcmp
(
test
,
"tcp_basic"
)
==
0
)
{
ok
(
RPC_S_OK
==
RpcStringBindingCompose
(
NULL
,
iptcp
,
address
,
port
,
NULL
,
&
binding
),
"RpcStringBindingCompose
\n
"
);
ok
(
RPC_S_OK
==
RpcBindingFromStringBinding
(
binding
,
&
IServer_IfHandle
),
"RpcBindingFromStringBinding
\n
"
);
ok
(
RPC_S_OK
==
RpcStringBindingCompose
A
(
NULL
,
iptcp
,
address
,
port
,
NULL
,
&
binding
),
"RpcStringBindingCompose
\n
"
);
ok
(
RPC_S_OK
==
RpcBindingFromStringBinding
A
(
binding
,
&
IServer_IfHandle
),
"RpcBindingFromStringBinding
\n
"
);
run_tests
();
authinfo_test
(
RPC_PROTSEQ_TCP
,
0
);
ok
(
RPC_S_OK
==
RpcStringFree
(
&
binding
),
"RpcStringFree
\n
"
);
ok
(
RPC_S_OK
==
RpcStringFree
A
(
&
binding
),
"RpcStringFree
\n
"
);
ok
(
RPC_S_OK
==
RpcBindingFree
(
&
IServer_IfHandle
),
"RpcBindingFree
\n
"
);
}
else
if
(
strcmp
(
test
,
"tcp_secure"
)
==
0
)
{
ok
(
RPC_S_OK
==
RpcStringBindingCompose
(
NULL
,
iptcp
,
address
,
port
,
NULL
,
&
binding
),
"RpcStringBindingCompose
\n
"
);
ok
(
RPC_S_OK
==
RpcBindingFromStringBinding
(
binding
,
&
IServer_IfHandle
),
"RpcBindingFromStringBinding
\n
"
);
ok
(
RPC_S_OK
==
RpcStringBindingCompose
A
(
NULL
,
iptcp
,
address
,
port
,
NULL
,
&
binding
),
"RpcStringBindingCompose
\n
"
);
ok
(
RPC_S_OK
==
RpcBindingFromStringBinding
A
(
binding
,
&
IServer_IfHandle
),
"RpcBindingFromStringBinding
\n
"
);
set_auth_info
(
IServer_IfHandle
);
authinfo_test
(
RPC_PROTSEQ_TCP
,
1
);
ok
(
RPC_S_OK
==
RpcStringFree
(
&
binding
),
"RpcStringFree
\n
"
);
ok
(
RPC_S_OK
==
RpcStringFree
A
(
&
binding
),
"RpcStringFree
\n
"
);
ok
(
RPC_S_OK
==
RpcBindingFree
(
&
IServer_IfHandle
),
"RpcBindingFree
\n
"
);
}
else
if
(
strcmp
(
test
,
"ncalrpc_basic"
)
==
0
)
{
ok
(
RPC_S_OK
==
RpcStringBindingCompose
(
NULL
,
ncalrpc
,
NULL
,
guid
,
NULL
,
&
binding
),
"RpcStringBindingCompose
\n
"
);
ok
(
RPC_S_OK
==
RpcBindingFromStringBinding
(
binding
,
&
IServer_IfHandle
),
"RpcBindingFromStringBinding
\n
"
);
ok
(
RPC_S_OK
==
RpcStringBindingCompose
A
(
NULL
,
ncalrpc
,
NULL
,
guid
,
NULL
,
&
binding
),
"RpcStringBindingCompose
\n
"
);
ok
(
RPC_S_OK
==
RpcBindingFromStringBinding
A
(
binding
,
&
IServer_IfHandle
),
"RpcBindingFromStringBinding
\n
"
);
run_tests
();
/* can cause RPC_X_BAD_STUB_DATA exception */
authinfo_test
(
RPC_PROTSEQ_LRPC
,
0
);
ok
(
RPC_S_OK
==
RpcStringFree
(
&
binding
),
"RpcStringFree
\n
"
);
ok
(
RPC_S_OK
==
RpcStringFree
A
(
&
binding
),
"RpcStringFree
\n
"
);
ok
(
RPC_S_OK
==
RpcBindingFree
(
&
IServer_IfHandle
),
"RpcBindingFree
\n
"
);
}
else
if
(
strcmp
(
test
,
"ncalrpc_secure"
)
==
0
)
{
ok
(
RPC_S_OK
==
RpcStringBindingCompose
(
NULL
,
ncalrpc
,
NULL
,
guid
,
NULL
,
&
binding
),
"RpcStringBindingCompose
\n
"
);
ok
(
RPC_S_OK
==
RpcBindingFromStringBinding
(
binding
,
&
IServer_IfHandle
),
"RpcBindingFromStringBinding
\n
"
);
ok
(
RPC_S_OK
==
RpcStringBindingCompose
A
(
NULL
,
ncalrpc
,
NULL
,
guid
,
NULL
,
&
binding
),
"RpcStringBindingCompose
\n
"
);
ok
(
RPC_S_OK
==
RpcBindingFromStringBinding
A
(
binding
,
&
IServer_IfHandle
),
"RpcBindingFromStringBinding
\n
"
);
set_auth_info
(
IServer_IfHandle
);
authinfo_test
(
RPC_PROTSEQ_LRPC
,
1
);
ok
(
RPC_S_OK
==
RpcStringFree
(
&
binding
),
"RpcStringFree
\n
"
);
ok
(
RPC_S_OK
==
RpcStringFree
A
(
&
binding
),
"RpcStringFree
\n
"
);
ok
(
RPC_S_OK
==
RpcBindingFree
(
&
IServer_IfHandle
),
"RpcBindingFree
\n
"
);
}
else
if
(
strcmp
(
test
,
"np_basic"
)
==
0
)
{
ok
(
RPC_S_OK
==
RpcStringBindingCompose
(
NULL
,
np
,
address_np
,
pipe
,
NULL
,
&
binding
),
"RpcStringBindingCompose
\n
"
);
ok
(
RPC_S_OK
==
RpcBindingFromStringBinding
(
binding
,
&
IServer_IfHandle
),
"RpcBindingFromStringBinding
\n
"
);
ok
(
RPC_S_OK
==
RpcStringBindingCompose
A
(
NULL
,
np
,
address_np
,
pipe
,
NULL
,
&
binding
),
"RpcStringBindingCompose
\n
"
);
ok
(
RPC_S_OK
==
RpcBindingFromStringBinding
A
(
binding
,
&
IServer_IfHandle
),
"RpcBindingFromStringBinding
\n
"
);
run_tests
();
authinfo_test
(
RPC_PROTSEQ_NMP
,
0
);
stop
();
ok
(
RPC_S_OK
==
RpcStringFree
(
&
binding
),
"RpcStringFree
\n
"
);
ok
(
RPC_S_OK
==
RpcStringFree
A
(
&
binding
),
"RpcStringFree
\n
"
);
ok
(
RPC_S_OK
==
RpcBindingFree
(
&
IServer_IfHandle
),
"RpcBindingFree
\n
"
);
}
}
...
...
@@ -1560,13 +1561,13 @@ server(void)
RPC_STATUS
status
,
iptcp_status
,
np_status
,
ncalrpc_status
;
DWORD
ret
;
iptcp_status
=
RpcServerUseProtseqEp
(
iptcp
,
20
,
port
,
NULL
);
iptcp_status
=
RpcServerUseProtseqEp
A
(
iptcp
,
20
,
port
,
NULL
);
ok
(
iptcp_status
==
RPC_S_OK
,
"RpcServerUseProtseqEp(ncacn_ip_tcp) failed with status %d
\n
"
,
iptcp_status
);
ncalrpc_status
=
RpcServerUseProtseqEp
(
ncalrpc
,
0
,
guid
,
NULL
);
ncalrpc_status
=
RpcServerUseProtseqEp
A
(
ncalrpc
,
0
,
guid
,
NULL
);
ok
(
ncalrpc_status
==
RPC_S_OK
,
"RpcServerUseProtseqEp(ncalrpc) failed with status %d
\n
"
,
ncalrpc_status
);
np_status
=
RpcServerUseProtseqEp
(
np
,
0
,
pipe
,
NULL
);
np_status
=
RpcServerUseProtseqEp
A
(
np
,
0
,
pipe
,
NULL
);
if
(
np_status
==
RPC_S_PROTSEQ_NOT_SUPPORTED
)
skip
(
"Protocol sequence ncacn_np is not supported
\n
"
);
else
...
...
@@ -1584,7 +1585,7 @@ server(void)
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 %d
\n
"
,
status
);
stop_event
=
CreateEvent
(
NULL
,
FALSE
,
FALSE
,
NULL
);
stop_event
=
CreateEvent
W
(
NULL
,
FALSE
,
FALSE
,
NULL
);
ok
(
stop_event
!=
NULL
,
"CreateEvent failed with error %d
\n
"
,
GetLastError
());
if
(
iptcp_status
==
RPC_S_OK
)
...
...
tools/winapi/tests.dat
View file @
06246aff
...
...
@@ -934,6 +934,7 @@ rpcproxy.h
<stdarg.h>
"windef.h"
"winbase.h"
"ole2.h"
"rpc.h"
"rpcndr.h"
"rpcproxy.h"
...
...
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