Commit 06246aff authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

rpcrt4: Compile tests with -D__WINESRC__.

parent a808f23c
TESTDLL = rpcrt4.dll TESTDLL = rpcrt4.dll
IMPORTS = ole32 rpcrt4 advapi32 IMPORTS = ole32 rpcrt4 advapi32
EXTRADEFS = -U__WINESRC__ -DWINE_STRICT_PROTOTYPES -DWINE_NO_NAMELESS_EXTENSION -DWIDL_C_INLINE_WRAPPERS
EXTRAIDLFLAGS = --prefix-server=s_ EXTRAIDLFLAGS = --prefix-server=s_
IDL_C_SRCS = server.idl IDL_C_SRCS = server.idl
......
...@@ -29,8 +29,8 @@ ...@@ -29,8 +29,8 @@
#include <winnt.h> #include <winnt.h>
#include <winerror.h> #include <winerror.h>
#include "initguid.h" #include "initguid.h"
#include <ole2.h>
#include "rpc.h" #include "rpc.h"
#include "rpcdce.h" #include "rpcdce.h"
#include "rpcproxy.h" #include "rpcproxy.h"
......
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
#include <stdarg.h> #include <stdarg.h>
#include "windef.h" #include "windef.h"
#include "winbase.h" #include "winbase.h"
#include "ole2.h"
#include "rpc.h" #include "rpc.h"
#include "rpcndr.h" #include "rpcndr.h"
#include "rpcproxy.h" #include "rpcproxy.h"
......
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
#include <winbase.h> #include <winbase.h>
#include <winnt.h> #include <winnt.h>
#include <winerror.h> #include <winerror.h>
#include <ole2.h>
#include "rpc.h" #include "rpc.h"
#include "rpcdce.h" #include "rpcdce.h"
...@@ -2092,7 +2093,7 @@ static void test_ndr_buffer(void) ...@@ -2092,7 +2093,7 @@ static void test_ndr_buffer(void)
StubDesc.RpcInterfaceInformation = (void *)&IFoo___RpcServerInterface; StubDesc.RpcInterfaceInformation = (void *)&IFoo___RpcServerInterface;
status = RpcServerUseProtseqEp(ncalrpc, 20, endpoint, NULL); status = RpcServerUseProtseqEpA(ncalrpc, 20, endpoint, NULL);
ok(RPC_S_OK == status, "RpcServerUseProtseqEp failed with status %u\n", status); ok(RPC_S_OK == status, "RpcServerUseProtseqEp failed with status %u\n", status);
status = RpcServerRegisterIf(IFoo_v0_0_s_ifspec, NULL, NULL); status = RpcServerRegisterIf(IFoo_v0_0_s_ifspec, NULL, NULL);
ok(RPC_S_OK == status, "RpcServerRegisterIf failed with status %u\n", status); ok(RPC_S_OK == status, "RpcServerRegisterIf failed with status %u\n", status);
...@@ -2104,12 +2105,12 @@ static void test_ndr_buffer(void) ...@@ -2104,12 +2105,12 @@ static void test_ndr_buffer(void)
return; return;
} }
status = RpcStringBindingCompose(NULL, ncalrpc, NULL, endpoint, NULL, &binding); status = RpcStringBindingComposeA(NULL, ncalrpc, NULL, endpoint, NULL, &binding);
ok(status == RPC_S_OK, "RpcStringBindingCompose failed (%u)\n", status); ok(status == RPC_S_OK, "RpcStringBindingCompose failed (%u)\n", status);
status = RpcBindingFromStringBinding(binding, &Handle); status = RpcBindingFromStringBindingA(binding, &Handle);
ok(status == RPC_S_OK, "RpcBindingFromStringBinding failed (%u)\n", status); ok(status == RPC_S_OK, "RpcBindingFromStringBinding failed (%u)\n", status);
RpcStringFree(&binding); RpcStringFreeA(&binding);
NdrClientInitializeNew(&RpcMessage, &StubMsg, &StubDesc, 5); NdrClientInitializeNew(&RpcMessage, &StubMsg, &StubDesc, 5);
...@@ -2208,7 +2209,7 @@ static void test_NdrGetUserMarshalInfo(void) ...@@ -2208,7 +2209,7 @@ static void test_NdrGetUserMarshalInfo(void)
RPC_MESSAGE rpc_msg; RPC_MESSAGE rpc_msg;
RPC_STATUS (RPC_ENTRY *pNdrGetUserMarshalInfo)(ULONG *,ULONG,NDR_USER_MARSHAL_INFO *); RPC_STATUS (RPC_ENTRY *pNdrGetUserMarshalInfo)(ULONG *,ULONG,NDR_USER_MARSHAL_INFO *);
pNdrGetUserMarshalInfo = (void *)GetProcAddress(GetModuleHandle("rpcrt4.dll"), "NdrGetUserMarshalInfo"); pNdrGetUserMarshalInfo = (void *)GetProcAddress(GetModuleHandleA("rpcrt4.dll"), "NdrGetUserMarshalInfo");
if (!pNdrGetUserMarshalInfo) if (!pNdrGetUserMarshalInfo)
{ {
skip("NdrGetUserMarshalInfo not exported\n"); skip("NdrGetUserMarshalInfo not exported\n");
......
...@@ -28,6 +28,8 @@ ...@@ -28,6 +28,8 @@
#include <winbase.h> #include <winbase.h>
#include <winnt.h> #include <winnt.h>
#include <winerror.h> #include <winerror.h>
#include <ole2.h>
#include <ntsecapi.h>
#include "rpc.h" #include "rpc.h"
#include "rpcdce.h" #include "rpcdce.h"
...@@ -113,7 +115,7 @@ static void UuidConversionAndComparison(void) { ...@@ -113,7 +115,7 @@ static void UuidConversionAndComparison(void) {
ok( (UuidFromStringA((unsigned char*)str, &Uuid1) == RPC_S_INVALID_STRING_UUID), "Invalid UUID String\n" ); 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. */ str[i2] = x; /* change it back so remaining tests are interesting. */
} }
RpcStringFree((unsigned char **)&str); RpcStringFreeA((unsigned char **)&str);
} }
/* Uuid to String to Uuid (wchar) */ /* Uuid to String to Uuid (wchar) */
...@@ -215,10 +217,10 @@ static void test_rpc_ncacn_ip_tcp(void) ...@@ -215,10 +217,10 @@ static void test_rpc_ncacn_ip_tcp(void)
static unsigned char endpoint[] = "4114"; static unsigned char endpoint[] = "4114";
static unsigned char spn[] = "principal"; static unsigned char spn[] = "principal";
status = RpcNetworkIsProtseqValid(foo); status = RpcNetworkIsProtseqValidA(foo);
ok(status == RPC_S_INVALID_RPC_PROTSEQ, "return wrong\n"); ok(status == RPC_S_INVALID_RPC_PROTSEQ, "return wrong\n");
status = RpcNetworkIsProtseqValid(ncacn_ip_tcp); status = RpcNetworkIsProtseqValidA(ncacn_ip_tcp);
ok(status == RPC_S_OK, "return wrong\n"); ok(status == RPC_S_OK, "return wrong\n");
status = RpcMgmtStopServerListening(NULL); status = RpcMgmtStopServerListening(NULL);
...@@ -235,7 +237,7 @@ todo_wine { ...@@ -235,7 +237,7 @@ todo_wine {
ok(status == RPC_S_NO_PROTSEQS_REGISTERED, ok(status == RPC_S_NO_PROTSEQS_REGISTERED,
"wrong RpcServerListen error (%u)\n", status); "wrong RpcServerListen error (%u)\n", status);
status = RpcServerUseProtseqEp(ncacn_ip_tcp, 20, endpoint, NULL); status = RpcServerUseProtseqEpA(ncacn_ip_tcp, 20, endpoint, NULL);
ok(status == RPC_S_OK, "RpcServerUseProtseqEp failed (%u)\n", status); ok(status == RPC_S_OK, "RpcServerUseProtseqEp failed (%u)\n", status);
status = RpcServerRegisterIf(IFoo_v0_0_s_ifspec, NULL, NULL); status = RpcServerRegisterIf(IFoo_v0_0_s_ifspec, NULL, NULL);
...@@ -252,30 +254,30 @@ todo_wine { ...@@ -252,30 +254,30 @@ todo_wine {
"wrong RpcServerListen error (%u)\n", status); "wrong RpcServerListen error (%u)\n", status);
} }
status = RpcStringBindingCompose(NULL, ncacn_ip_tcp, address, status = RpcStringBindingComposeA(NULL, ncacn_ip_tcp, address,
endpoint, NULL, &binding); endpoint, NULL, &binding);
ok(status == RPC_S_OK, "RpcStringBindingCompose failed (%u)\n", status); ok(status == RPC_S_OK, "RpcStringBindingCompose failed (%u)\n", status);
status = RpcBindingFromStringBinding(binding, &IFoo_IfHandle); status = RpcBindingFromStringBindingA(binding, &IFoo_IfHandle);
ok(status == RPC_S_OK, "RpcBindingFromStringBinding failed (%u)\n", ok(status == RPC_S_OK, "RpcBindingFromStringBinding failed (%u)\n",
status); status);
status = RpcBindingSetAuthInfo(IFoo_IfHandle, NULL, RPC_C_AUTHN_LEVEL_NONE, status = RpcBindingSetAuthInfoA(IFoo_IfHandle, NULL, RPC_C_AUTHN_LEVEL_NONE,
RPC_C_AUTHN_WINNT, NULL, RPC_C_AUTHZ_NAME); RPC_C_AUTHN_WINNT, NULL, RPC_C_AUTHZ_NAME);
ok(status == RPC_S_OK, "RpcBindingSetAuthInfo failed (%u)\n", status); ok(status == RPC_S_OK, "RpcBindingSetAuthInfo failed (%u)\n", status);
status = RpcBindingInqAuthInfo(IFoo_IfHandle, NULL, NULL, NULL, NULL, NULL); status = RpcBindingInqAuthInfoA(IFoo_IfHandle, NULL, NULL, NULL, NULL, NULL);
ok(status == RPC_S_BINDING_HAS_NO_AUTH, "RpcBindingInqAuthInfo failed (%u)\n", ok(status == RPC_S_BINDING_HAS_NO_AUTH, "RpcBindingInqAuthInfo failed (%u)\n",
status); status);
status = RpcBindingSetAuthInfo(IFoo_IfHandle, spn, RPC_C_AUTHN_LEVEL_PKT_PRIVACY, status = RpcBindingSetAuthInfoA(IFoo_IfHandle, spn, RPC_C_AUTHN_LEVEL_PKT_PRIVACY,
RPC_C_AUTHN_WINNT, NULL, RPC_C_AUTHZ_NAME); RPC_C_AUTHN_WINNT, NULL, RPC_C_AUTHZ_NAME);
ok(status == RPC_S_OK, "RpcBindingSetAuthInfo failed (%u)\n", status); ok(status == RPC_S_OK, "RpcBindingSetAuthInfo failed (%u)\n", status);
level = authnsvc = authzsvc = 0; level = authnsvc = authzsvc = 0;
principal = (unsigned char *)0xdeadbeef; principal = (unsigned char *)0xdeadbeef;
identity = (RPC_AUTH_IDENTITY_HANDLE *)0xdeadbeef; identity = (RPC_AUTH_IDENTITY_HANDLE *)0xdeadbeef;
status = RpcBindingInqAuthInfo(IFoo_IfHandle, &principal, &level, &authnsvc, status = RpcBindingInqAuthInfoA(IFoo_IfHandle, &principal, &level, &authnsvc,
&identity, &authzsvc); &identity, &authzsvc);
ok(status == RPC_S_OK, "RpcBindingInqAuthInfo failed (%u)\n", status); ok(status == RPC_S_OK, "RpcBindingInqAuthInfo failed (%u)\n", status);
...@@ -284,7 +286,7 @@ todo_wine { ...@@ -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(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); 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); 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) RpcStringFreeA(&principal);
status = RpcMgmtStopServerListening(NULL); status = RpcMgmtStopServerListening(NULL);
ok(status == RPC_S_OK, "RpcMgmtStopServerListening failed (%u)\n", ok(status == RPC_S_OK, "RpcMgmtStopServerListening failed (%u)\n",
...@@ -302,7 +304,7 @@ todo_wine { ...@@ -302,7 +304,7 @@ todo_wine {
ok(status == RPC_S_OK, "RpcMgmtWaitServerListen failed (%u)\n", status); ok(status == RPC_S_OK, "RpcMgmtWaitServerListen failed (%u)\n", status);
} }
status = RpcStringFree(&binding); status = RpcStringFreeA(&binding);
ok(status == RPC_S_OK, "RpcStringFree failed (%u)\n", status); ok(status == RPC_S_OK, "RpcStringFree failed (%u)\n", status);
status = RpcBindingFree(&IFoo_IfHandle); status = RpcBindingFree(&IFoo_IfHandle);
...@@ -659,7 +661,7 @@ static void test_I_RpcExceptionFilter(void) ...@@ -659,7 +661,7 @@ static void test_I_RpcExceptionFilter(void)
{ {
ULONG exception; ULONG exception;
int retval; int retval;
int (WINAPI *pI_RpcExceptionFilter)(ULONG) = (void *)GetProcAddress(GetModuleHandle("rpcrt4.dll"), "I_RpcExceptionFilter"); int (WINAPI *pI_RpcExceptionFilter)(ULONG) = (void *)GetProcAddress(GetModuleHandleA("rpcrt4.dll"), "I_RpcExceptionFilter");
if (!pI_RpcExceptionFilter) if (!pI_RpcExceptionFilter)
{ {
...@@ -709,20 +711,20 @@ static void test_RpcStringBindingFromBinding(void) ...@@ -709,20 +711,20 @@ static void test_RpcStringBindingFromBinding(void)
handle_t handle; handle_t handle;
RPC_CSTR binding; RPC_CSTR binding;
status = RpcStringBindingCompose(NULL, ncacn_np, address, status = RpcStringBindingComposeA(NULL, ncacn_np, address,
endpoint, NULL, &binding); endpoint, NULL, &binding);
ok(status == RPC_S_OK, "RpcStringBindingCompose failed (%u)\n", status); ok(status == RPC_S_OK, "RpcStringBindingCompose failed (%u)\n", status);
status = RpcBindingFromStringBinding(binding, &handle); status = RpcBindingFromStringBindingA(binding, &handle);
ok(status == RPC_S_OK, "RpcBindingFromStringBinding failed (%u)\n", status); ok(status == RPC_S_OK, "RpcBindingFromStringBinding failed (%u)\n", status);
RpcStringFree(&binding); RpcStringFreeA(&binding);
status = RpcBindingToStringBinding(handle, &binding); status = RpcBindingToStringBindingA(handle, &binding);
ok(status == RPC_S_OK, "RpcStringBindingFromBinding failed with error %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]"), ok(!strcmp((const char *)binding, "ncacn_np:.[\\\\pipe\\\\wine_rpc_test]"),
"binding string didn't match what was expected: \"%s\"\n", binding); "binding string didn't match what was expected: \"%s\"\n", binding);
RpcStringFree(&binding); RpcStringFreeA(&binding);
status = RpcBindingFree(&handle); status = RpcBindingFree(&handle);
ok(status == RPC_S_OK, "RpcBindingFree failed with error %u\n", status); ok(status == RPC_S_OK, "RpcBindingFree failed with error %u\n", status);
...@@ -798,7 +800,7 @@ static void test_UuidCreateSequential(void) ...@@ -798,7 +800,7 @@ static void test_UuidCreateSequential(void)
{ {
UUID guid1; UUID guid1;
BYTE version; BYTE version;
RPC_STATUS (WINAPI *pUuidCreateSequential)(UUID *) = (void *)GetProcAddress(GetModuleHandle("rpcrt4.dll"), "UuidCreateSequential"); RPC_STATUS (WINAPI *pUuidCreateSequential)(UUID *) = (void *)GetProcAddress(GetModuleHandleA("rpcrt4.dll"), "UuidCreateSequential");
RPC_STATUS ret; RPC_STATUS ret;
if (!pUuidCreateSequential) if (!pUuidCreateSequential)
...@@ -903,12 +905,12 @@ static void test_RpcServerInqDefaultPrincName(void) ...@@ -903,12 +905,12 @@ static void test_RpcServerInqDefaultPrincName(void)
ok( ret == RPC_S_OK, "got %u\n", ret ); ok( ret == RPC_S_OK, "got %u\n", ret );
ok( principal != (RPC_CSTR)0xdeadbeef, "expected valid principal\n" ); ok( principal != (RPC_CSTR)0xdeadbeef, "expected valid principal\n" );
ok( !strcmp( (const char *)principal, username ), "got \'%s\'\n", principal ); ok( !strcmp( (const char *)principal, username ), "got \'%s\'\n", principal );
RpcStringFree( &principal ); RpcStringFreeA( &principal );
ret = RpcServerRegisterAuthInfoA( saved_principal, RPC_C_AUTHN_WINNT, NULL, NULL ); ret = RpcServerRegisterAuthInfoA( saved_principal, RPC_C_AUTHN_WINNT, NULL, NULL );
ok( ret == RPC_S_OK, "got %u\n", ret ); ok( ret == RPC_S_OK, "got %u\n", ret );
RpcStringFree( &saved_principal ); RpcStringFreeA( &saved_principal );
HeapFree( GetProcessHeap(), 0, username ); HeapFree( GetProcessHeap(), 0, username );
} }
......
...@@ -80,7 +80,7 @@ static void test_RpcAsyncGetCallStatus(void) ...@@ -80,7 +80,7 @@ static void test_RpcAsyncGetCallStatus(void)
START_TEST( rpc_async ) START_TEST( rpc_async )
{ {
HMODULE hRpcRt4 = GetModuleHandle("rpcrt4.dll"); HMODULE hRpcRt4 = GetModuleHandleA("rpcrt4.dll");
pRpcAsyncInitializeHandle = (void *)GetProcAddress(hRpcRt4, "RpcAsyncInitializeHandle"); pRpcAsyncInitializeHandle = (void *)GetProcAddress(hRpcRt4, "RpcAsyncInitializeHandle");
pRpcAsyncGetCallStatus = (void *)GetProcAddress(hRpcRt4, "RpcAsyncGetCallStatus"); pRpcAsyncGetCallStatus = (void *)GetProcAddress(hRpcRt4, "RpcAsyncGetCallStatus");
if (!pRpcAsyncInitializeHandle || !pRpcAsyncGetCallStatus) if (!pRpcAsyncInitializeHandle || !pRpcAsyncGetCallStatus)
......
...@@ -55,24 +55,24 @@ static void test_RpcServerUseProtseq(void) ...@@ -55,24 +55,24 @@ static void test_RpcServerUseProtseq(void)
/* show that RpcServerUseProtseqEp(..., NULL, ...) is the same as /* show that RpcServerUseProtseqEp(..., NULL, ...) is the same as
* RpcServerUseProtseq(...) */ * RpcServerUseProtseq(...) */
status = RpcServerUseProtseqEp(ncalrpc, 0, NULL, NULL); status = RpcServerUseProtseqEpA(ncalrpc, 0, NULL, NULL);
ok(status == RPC_S_OK || broken(status == RPC_S_INVALID_ENDPOINT_FORMAT), ok(status == RPC_S_OK || broken(status == RPC_S_INVALID_ENDPOINT_FORMAT),
"RpcServerUseProtseqEp with NULL endpoint failed with status %d\n", "RpcServerUseProtseqEp with NULL endpoint failed with status %d\n",
status); status);
/* register protocol sequences without explicit endpoints */ /* register protocol sequences without explicit endpoints */
status = RpcServerUseProtseq(np, 0, NULL); status = RpcServerUseProtseqA(np, 0, NULL);
if (status == RPC_S_PROTSEQ_NOT_SUPPORTED) if (status == RPC_S_PROTSEQ_NOT_SUPPORTED)
win_skip("ncacn_np not supported\n"); win_skip("ncacn_np not supported\n");
else else
ok(status == RPC_S_OK, "RpcServerUseProtseq(ncacn_np) failed with status %d\n", status); ok(status == RPC_S_OK, "RpcServerUseProtseq(ncacn_np) failed with status %d\n", status);
if (status == RPC_S_OK) endpoints_registered++; if (status == RPC_S_OK) endpoints_registered++;
status = RpcServerUseProtseq(iptcp, 0, NULL); status = RpcServerUseProtseqA(iptcp, 0, NULL);
ok(status == RPC_S_OK, "RpcServerUseProtseq(ncacn_ip_tcp) failed with status %d\n", status); ok(status == RPC_S_OK, "RpcServerUseProtseq(ncacn_ip_tcp) failed with status %d\n", status);
if (status == RPC_S_OK) endpoints_registered++; if (status == RPC_S_OK) endpoints_registered++;
status = RpcServerUseProtseq(ncalrpc, 0, NULL); status = RpcServerUseProtseqA(ncalrpc, 0, NULL);
ok(status == RPC_S_OK, "RpcServerUseProtseqEp(ncalrpc) failed with status %d\n", status); ok(status == RPC_S_OK, "RpcServerUseProtseqEp(ncalrpc) failed with status %d\n", status);
if (status == RPC_S_OK) endpoints_registered++; if (status == RPC_S_OK) endpoints_registered++;
...@@ -85,24 +85,24 @@ static void test_RpcServerUseProtseq(void) ...@@ -85,24 +85,24 @@ static void test_RpcServerUseProtseq(void)
for (i = 0; i < bindings->Count; i++) for (i = 0; i < bindings->Count; i++)
{ {
RPC_CSTR str_bind; RPC_CSTR str_bind;
status = RpcBindingToStringBinding(bindings->BindingH[i], &str_bind); status = RpcBindingToStringBindingA(bindings->BindingH[i], &str_bind);
ok(status == RPC_S_OK, "RpcBindingToStringBinding failed with status %d\n", status); ok(status == RPC_S_OK, "RpcBindingToStringBinding failed with status %d\n", status);
trace("string binding: %s\n", str_bind); trace("string binding: %s\n", str_bind);
RpcStringFree(&str_bind); RpcStringFreeA(&str_bind);
} }
RpcBindingVectorFree(&bindings); RpcBindingVectorFree(&bindings);
/* re-register - endpoints should be reused */ /* re-register - endpoints should be reused */
status = RpcServerUseProtseq(np, 0, NULL); status = RpcServerUseProtseqA(np, 0, NULL);
if (status == RPC_S_PROTSEQ_NOT_SUPPORTED) if (status == RPC_S_PROTSEQ_NOT_SUPPORTED)
win_skip("ncacn_np not supported\n"); win_skip("ncacn_np not supported\n");
else else
ok(status == RPC_S_OK, "RpcServerUseProtseq(ncacn_np) failed with status %d\n", status); ok(status == RPC_S_OK, "RpcServerUseProtseq(ncacn_np) failed with status %d\n", status);
status = RpcServerUseProtseq(iptcp, 0, NULL); status = RpcServerUseProtseqA(iptcp, 0, NULL);
ok(status == RPC_S_OK, "RpcServerUseProtseq(ncacn_ip_tcp) failed with status %d\n", status); ok(status == RPC_S_OK, "RpcServerUseProtseq(ncacn_ip_tcp) failed with status %d\n", status);
status = RpcServerUseProtseq(ncalrpc, 0, NULL); status = RpcServerUseProtseqA(ncalrpc, 0, NULL);
ok(status == RPC_S_OK, "RpcServerUseProtseqEp(ncalrpc) failed with status %d\n", status); ok(status == RPC_S_OK, "RpcServerUseProtseqEp(ncalrpc) failed with status %d\n", status);
status = RpcServerInqBindings(&bindings); status = RpcServerInqBindings(&bindings);
...@@ -161,14 +161,14 @@ static void test_endpoint_mapper(RPC_CSTR protseq, RPC_CSTR address) ...@@ -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); 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); ok(status == RPC_S_OK, "%s: RpcEpRegisterA failed with error %u\n", protseq, status);
status = RpcStringBindingCompose(NULL, protseq, address, status = RpcStringBindingComposeA(NULL, protseq, address,
NULL, NULL, &binding); NULL, NULL, &binding);
ok(status == RPC_S_OK, "%s: RpcStringBindingCompose failed (%u)\n", protseq, status); ok(status == RPC_S_OK, "%s: RpcStringBindingCompose failed (%u)\n", protseq, status);
status = RpcBindingFromStringBinding(binding, &handle); status = RpcBindingFromStringBindingA(binding, &handle);
ok(status == RPC_S_OK, "%s: RpcBindingFromStringBinding failed (%u)\n", protseq, status); ok(status == RPC_S_OK, "%s: RpcBindingFromStringBinding failed (%u)\n", protseq, status);
RpcStringFree(&binding); RpcStringFreeA(&binding);
status = RpcBindingReset(handle); status = RpcBindingReset(handle);
ok(status == RPC_S_OK, "%s: RpcBindingReset failed with error %u\n", protseq, status); ok(status == RPC_S_OK, "%s: RpcBindingReset failed with error %u\n", protseq, status);
......
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
*/ */
#include <windows.h> #include <windows.h>
#include <ole2.h>
#include <secext.h> #include <secext.h>
#include <rpcdce.h> #include <rpcdce.h>
#include "wine/test.h" #include "wine/test.h"
...@@ -1492,58 +1493,58 @@ client(const char *test) ...@@ -1492,58 +1493,58 @@ client(const char *test)
if (strcmp(test, "tcp_basic") == 0) if (strcmp(test, "tcp_basic") == 0)
{ {
ok(RPC_S_OK == RpcStringBindingCompose(NULL, iptcp, address, port, NULL, &binding), "RpcStringBindingCompose\n"); ok(RPC_S_OK == RpcStringBindingComposeA(NULL, iptcp, address, port, NULL, &binding), "RpcStringBindingCompose\n");
ok(RPC_S_OK == RpcBindingFromStringBinding(binding, &IServer_IfHandle), "RpcBindingFromStringBinding\n"); ok(RPC_S_OK == RpcBindingFromStringBindingA(binding, &IServer_IfHandle), "RpcBindingFromStringBinding\n");
run_tests(); run_tests();
authinfo_test(RPC_PROTSEQ_TCP, 0); authinfo_test(RPC_PROTSEQ_TCP, 0);
ok(RPC_S_OK == RpcStringFree(&binding), "RpcStringFree\n"); ok(RPC_S_OK == RpcStringFreeA(&binding), "RpcStringFree\n");
ok(RPC_S_OK == RpcBindingFree(&IServer_IfHandle), "RpcBindingFree\n"); ok(RPC_S_OK == RpcBindingFree(&IServer_IfHandle), "RpcBindingFree\n");
} }
else if (strcmp(test, "tcp_secure") == 0) else if (strcmp(test, "tcp_secure") == 0)
{ {
ok(RPC_S_OK == RpcStringBindingCompose(NULL, iptcp, address, port, NULL, &binding), "RpcStringBindingCompose\n"); ok(RPC_S_OK == RpcStringBindingComposeA(NULL, iptcp, address, port, NULL, &binding), "RpcStringBindingCompose\n");
ok(RPC_S_OK == RpcBindingFromStringBinding(binding, &IServer_IfHandle), "RpcBindingFromStringBinding\n"); ok(RPC_S_OK == RpcBindingFromStringBindingA(binding, &IServer_IfHandle), "RpcBindingFromStringBinding\n");
set_auth_info(IServer_IfHandle); set_auth_info(IServer_IfHandle);
authinfo_test(RPC_PROTSEQ_TCP, 1); authinfo_test(RPC_PROTSEQ_TCP, 1);
ok(RPC_S_OK == RpcStringFree(&binding), "RpcStringFree\n"); ok(RPC_S_OK == RpcStringFreeA(&binding), "RpcStringFree\n");
ok(RPC_S_OK == RpcBindingFree(&IServer_IfHandle), "RpcBindingFree\n"); ok(RPC_S_OK == RpcBindingFree(&IServer_IfHandle), "RpcBindingFree\n");
} }
else if (strcmp(test, "ncalrpc_basic") == 0) else if (strcmp(test, "ncalrpc_basic") == 0)
{ {
ok(RPC_S_OK == RpcStringBindingCompose(NULL, ncalrpc, NULL, guid, NULL, &binding), "RpcStringBindingCompose\n"); ok(RPC_S_OK == RpcStringBindingComposeA(NULL, ncalrpc, NULL, guid, NULL, &binding), "RpcStringBindingCompose\n");
ok(RPC_S_OK == RpcBindingFromStringBinding(binding, &IServer_IfHandle), "RpcBindingFromStringBinding\n"); ok(RPC_S_OK == RpcBindingFromStringBindingA(binding, &IServer_IfHandle), "RpcBindingFromStringBinding\n");
run_tests(); /* can cause RPC_X_BAD_STUB_DATA exception */ run_tests(); /* can cause RPC_X_BAD_STUB_DATA exception */
authinfo_test(RPC_PROTSEQ_LRPC, 0); authinfo_test(RPC_PROTSEQ_LRPC, 0);
ok(RPC_S_OK == RpcStringFree(&binding), "RpcStringFree\n"); ok(RPC_S_OK == RpcStringFreeA(&binding), "RpcStringFree\n");
ok(RPC_S_OK == RpcBindingFree(&IServer_IfHandle), "RpcBindingFree\n"); ok(RPC_S_OK == RpcBindingFree(&IServer_IfHandle), "RpcBindingFree\n");
} }
else if (strcmp(test, "ncalrpc_secure") == 0) else if (strcmp(test, "ncalrpc_secure") == 0)
{ {
ok(RPC_S_OK == RpcStringBindingCompose(NULL, ncalrpc, NULL, guid, NULL, &binding), "RpcStringBindingCompose\n"); ok(RPC_S_OK == RpcStringBindingComposeA(NULL, ncalrpc, NULL, guid, NULL, &binding), "RpcStringBindingCompose\n");
ok(RPC_S_OK == RpcBindingFromStringBinding(binding, &IServer_IfHandle), "RpcBindingFromStringBinding\n"); ok(RPC_S_OK == RpcBindingFromStringBindingA(binding, &IServer_IfHandle), "RpcBindingFromStringBinding\n");
set_auth_info(IServer_IfHandle); set_auth_info(IServer_IfHandle);
authinfo_test(RPC_PROTSEQ_LRPC, 1); authinfo_test(RPC_PROTSEQ_LRPC, 1);
ok(RPC_S_OK == RpcStringFree(&binding), "RpcStringFree\n"); ok(RPC_S_OK == RpcStringFreeA(&binding), "RpcStringFree\n");
ok(RPC_S_OK == RpcBindingFree(&IServer_IfHandle), "RpcBindingFree\n"); ok(RPC_S_OK == RpcBindingFree(&IServer_IfHandle), "RpcBindingFree\n");
} }
else if (strcmp(test, "np_basic") == 0) 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 == RpcStringBindingComposeA(NULL, np, address_np, pipe, NULL, &binding), "RpcStringBindingCompose\n");
ok(RPC_S_OK == RpcBindingFromStringBinding(binding, &IServer_IfHandle), "RpcBindingFromStringBinding\n"); ok(RPC_S_OK == RpcBindingFromStringBindingA(binding, &IServer_IfHandle), "RpcBindingFromStringBinding\n");
run_tests(); run_tests();
authinfo_test(RPC_PROTSEQ_NMP, 0); authinfo_test(RPC_PROTSEQ_NMP, 0);
stop(); stop();
ok(RPC_S_OK == RpcStringFree(&binding), "RpcStringFree\n"); ok(RPC_S_OK == RpcStringFreeA(&binding), "RpcStringFree\n");
ok(RPC_S_OK == RpcBindingFree(&IServer_IfHandle), "RpcBindingFree\n"); ok(RPC_S_OK == RpcBindingFree(&IServer_IfHandle), "RpcBindingFree\n");
} }
} }
...@@ -1560,13 +1561,13 @@ server(void) ...@@ -1560,13 +1561,13 @@ server(void)
RPC_STATUS status, iptcp_status, np_status, ncalrpc_status; RPC_STATUS status, iptcp_status, np_status, ncalrpc_status;
DWORD ret; DWORD ret;
iptcp_status = RpcServerUseProtseqEp(iptcp, 20, port, NULL); iptcp_status = RpcServerUseProtseqEpA(iptcp, 20, port, NULL);
ok(iptcp_status == RPC_S_OK, "RpcServerUseProtseqEp(ncacn_ip_tcp) failed with status %d\n", iptcp_status); 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 = RpcServerUseProtseqEpA(ncalrpc, 0, guid, NULL);
ok(ncalrpc_status == RPC_S_OK, "RpcServerUseProtseqEp(ncalrpc) failed with status %d\n", ncalrpc_status); ok(ncalrpc_status == RPC_S_OK, "RpcServerUseProtseqEp(ncalrpc) failed with status %d\n", ncalrpc_status);
np_status = RpcServerUseProtseqEp(np, 0, pipe, NULL); np_status = RpcServerUseProtseqEpA(np, 0, pipe, NULL);
if (np_status == RPC_S_PROTSEQ_NOT_SUPPORTED) if (np_status == RPC_S_PROTSEQ_NOT_SUPPORTED)
skip("Protocol sequence ncacn_np is not supported\n"); skip("Protocol sequence ncacn_np is not supported\n");
else else
...@@ -1584,7 +1585,7 @@ server(void) ...@@ -1584,7 +1585,7 @@ server(void)
ok(status == RPC_S_OK, "RpcServerRegisterIf failed with status %d\n", status); ok(status == RPC_S_OK, "RpcServerRegisterIf failed with status %d\n", status);
status = RpcServerListen(1, 20, TRUE); status = RpcServerListen(1, 20, TRUE);
ok(status == RPC_S_OK, "RpcServerListen failed with status %d\n", status); ok(status == RPC_S_OK, "RpcServerListen failed with status %d\n", status);
stop_event = CreateEvent(NULL, FALSE, FALSE, NULL); stop_event = CreateEventW(NULL, FALSE, FALSE, NULL);
ok(stop_event != NULL, "CreateEvent failed with error %d\n", GetLastError()); ok(stop_event != NULL, "CreateEvent failed with error %d\n", GetLastError());
if (iptcp_status == RPC_S_OK) if (iptcp_status == RPC_S_OK)
......
...@@ -934,6 +934,7 @@ rpcproxy.h ...@@ -934,6 +934,7 @@ rpcproxy.h
<stdarg.h> <stdarg.h>
"windef.h" "windef.h"
"winbase.h" "winbase.h"
"ole2.h"
"rpc.h" "rpc.h"
"rpcndr.h" "rpcndr.h"
"rpcproxy.h" "rpcproxy.h"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment