[RPCRT4_WINETEST]

* Sync with Wine 1.7.17.
CORE-8080

svn path=/trunk/; revision=62985
This commit is contained in:
Amine Khaldi
2014-04-26 16:58:32 +00:00
parent 03a79f2692
commit a6e17f6bca
6 changed files with 126 additions and 74 deletions
+5 -5
View File
@@ -2092,7 +2092,7 @@ static void test_ndr_buffer(void)
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);
status = RpcServerRegisterIf(IFoo_v0_0_s_ifspec, NULL, NULL);
ok(RPC_S_OK == status, "RpcServerRegisterIf failed with status %u\n", status);
@@ -2104,12 +2104,12 @@ static void test_ndr_buffer(void)
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);
status = RpcBindingFromStringBinding(binding, &Handle);
status = RpcBindingFromStringBindingA(binding, &Handle);
ok(status == RPC_S_OK, "RpcBindingFromStringBinding failed (%u)\n", status);
RpcStringFree(&binding);
RpcStringFreeA(&binding);
NdrClientInitializeNew(&RpcMessage, &StubMsg, &StubDesc, 5);
@@ -2208,7 +2208,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(GetModuleHandleA("rpcrt4.dll"), "NdrGetUserMarshalInfo");
if (!pNdrGetUserMarshalInfo)
{
skip("NdrGetUserMarshalInfo not exported\n");
+26 -37
View File
@@ -113,7 +113,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);
RpcStringFreeA((unsigned char **)&str);
}
/* Uuid to String to Uuid (wchar) */
@@ -215,10 +215,10 @@ static void test_rpc_ncacn_ip_tcp(void)
static unsigned char endpoint[] = "4114";
static unsigned char spn[] = "principal";
status = RpcNetworkIsProtseqValid(foo);
status = RpcNetworkIsProtseqValidA(foo);
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");
status = RpcMgmtStopServerListening(NULL);
@@ -235,7 +235,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 = RpcServerUseProtseqEpA(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 +252,30 @@ todo_wine {
"wrong RpcServerListen error (%u)\n", status);
}
status = RpcStringBindingCompose(NULL, ncacn_ip_tcp, address,
status = RpcStringBindingComposeA(NULL, ncacn_ip_tcp, address,
endpoint, NULL, &binding);
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",
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);
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",
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);
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 = RpcBindingInqAuthInfoA(IFoo_IfHandle, &principal, &level, &authnsvc,
&identity, &authzsvc);
ok(status == RPC_S_OK, "RpcBindingInqAuthInfo failed (%u)\n", status);
@@ -284,7 +284,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) RpcStringFreeA(&principal);
status = RpcMgmtStopServerListening(NULL);
ok(status == RPC_S_OK, "RpcMgmtStopServerListening failed (%u)\n",
@@ -302,7 +302,7 @@ todo_wine {
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);
status = RpcBindingFree(&IFoo_IfHandle);
@@ -659,7 +659,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(GetModuleHandleA("rpcrt4.dll"), "I_RpcExceptionFilter");
if (!pI_RpcExceptionFilter)
{
@@ -709,34 +709,25 @@ static void test_RpcStringBindingFromBinding(void)
handle_t handle;
RPC_CSTR binding;
status = RpcStringBindingCompose(NULL, ncacn_np, address,
status = RpcStringBindingComposeA(NULL, ncacn_np, address,
endpoint, NULL, &binding);
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);
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(!strcmp((const char *)binding, "ncacn_np:.[\\\\pipe\\\\wine_rpc_test]"),
"binding string didn't match what was expected: \"%s\"\n", binding);
RpcStringFree(&binding);
RpcStringFreeA(&binding);
status = RpcBindingFree(&handle);
ok(status == RPC_S_OK, "RpcBindingFree failed with error %u\n", status);
}
static char *printGuid(char *buf, int size, const UUID *guid)
{
snprintf(buf, size, "{%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}",
guid->Data1, guid->Data2, guid->Data3, guid->Data4[0], guid->Data4[1],
guid->Data4[2], guid->Data4[3], guid->Data4[4], guid->Data4[5],
guid->Data4[6], guid->Data4[7]);
return buf;
}
static void test_UuidCreate(void)
{
UUID guid;
@@ -754,7 +745,6 @@ static void test_UuidCreate(void)
UUID and, or;
RPC_STATUS rslt;
int i;
char buf[39];
and = guid;
or = guid;
@@ -778,9 +768,9 @@ static void test_UuidCreate(void)
*dst |= *src;
}
ok(UuidEqual(&and, &v4and, &rslt),
"unexpected bits set in V4 UUID: %s\n", printGuid(buf, sizeof(buf), &and));
"unexpected bits set in V4 UUID: %s\n", wine_dbgstr_guid(&and));
ok(UuidEqual(&or, &v4or, &rslt),
"unexpected bits set in V4 UUID: %s\n", printGuid(buf, sizeof(buf), &or));
"unexpected bits set in V4 UUID: %s\n", wine_dbgstr_guid(&or));
}
else
{
@@ -798,7 +788,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(GetModuleHandleA("rpcrt4.dll"), "UuidCreateSequential");
RPC_STATUS ret;
if (!pUuidCreateSequential)
@@ -814,7 +804,6 @@ static void test_UuidCreateSequential(void)
if (version == 1)
{
UUID guid2;
char buf[39];
if (!ret)
{
@@ -823,7 +812,7 @@ static void test_UuidCreateSequential(void)
*/
ok(!(guid1.Data4[2] & 0x01),
"GUID does not appear to contain a MAC address: %s\n",
printGuid(buf, sizeof(buf), &guid1));
wine_dbgstr_guid(&guid1));
}
else
{
@@ -832,7 +821,7 @@ static void test_UuidCreateSequential(void)
*/
ok((guid1.Data4[2] & 0x01),
"GUID does not appear to contain a multicast MAC address: %s\n",
printGuid(buf, sizeof(buf), &guid1));
wine_dbgstr_guid(&guid1));
}
/* Generate another GUID, and make sure its MAC address matches the
* first.
@@ -844,7 +833,7 @@ static void test_UuidCreateSequential(void)
ok(version == 1, "unexpected version %d\n", version);
ok(!memcmp(guid1.Data4, guid2.Data4, sizeof(guid2.Data4)),
"unexpected value in MAC address: %s\n",
printGuid(buf, sizeof(buf), &guid2));
wine_dbgstr_guid(&guid2));
}
}
@@ -903,12 +892,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 );
RpcStringFreeA( &principal );
ret = RpcServerRegisterAuthInfoA( saved_principal, RPC_C_AUTHN_WINNT, NULL, NULL );
ok( ret == RPC_S_OK, "got %u\n", ret );
RpcStringFree( &saved_principal );
RpcStringFreeA( &saved_principal );
HeapFree( GetProcessHeap(), 0, username );
}
+1 -1
View File
@@ -80,7 +80,7 @@ static void test_RpcAsyncGetCallStatus(void)
START_TEST( rpc_async )
{
HMODULE hRpcRt4 = GetModuleHandle("rpcrt4.dll");
HMODULE hRpcRt4 = GetModuleHandleA("rpcrt4.dll");
pRpcAsyncInitializeHandle = (void *)GetProcAddress(hRpcRt4, "RpcAsyncInitializeHandle");
pRpcAsyncGetCallStatus = (void *)GetProcAddress(hRpcRt4, "RpcAsyncGetCallStatus");
if (!pRpcAsyncInitializeHandle || !pRpcAsyncGetCallStatus)
+12 -12
View File
@@ -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 = RpcServerUseProtseqEpA(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 = RpcServerUseProtseqA(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 = RpcServerUseProtseqA(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 = RpcServerUseProtseqA(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 = RpcBindingToStringBindingA(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);
RpcStringFreeA(&str_bind);
}
RpcBindingVectorFree(&bindings);
/* re-register - endpoints should be reused */
status = RpcServerUseProtseq(np, 0, NULL);
status = RpcServerUseProtseqA(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 = RpcServerUseProtseqA(iptcp, 0, NULL);
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);
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 = RpcStringBindingComposeA(NULL, protseq, address,
NULL, NULL, &binding);
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);
RpcStringFree(&binding);
RpcStringFreeA(&binding);
status = RpcBindingReset(handle);
ok(status == RPC_S_OK, "%s: RpcBindingReset failed with error %u\n", protseq, status);
+74 -19
View File
@@ -53,6 +53,9 @@ static char *domain_and_user;
/* type check statements generated in header file */
fnprintf *p_printf = printf;
static const WCHAR helloW[] = { 'H','e','l','l','o',0 };
static const WCHAR worldW[] = { 'W','o','r','l','d','!',0 };
static void InitFunctionPointers(void)
{
HMODULE hrpcrt4 = GetModuleHandleA("rpcrt4.dll");
@@ -571,6 +574,34 @@ void __cdecl s_get_name(name_t *name)
name->name[name->size - 1] = 0;
}
void __cdecl s_get_names(int *n, str_array_t *names)
{
str_array_t list;
list = MIDL_user_allocate(2 * sizeof(list[0]));
list[0] = MIDL_user_allocate(6);
strcpy(list[0], "Hello");
list[1] = MIDL_user_allocate(7);
strcpy(list[1], "World!");
*names = list;
*n = 2;
}
void __cdecl s_get_namesw(int *n, wstr_array_t *names)
{
wstr_array_t list;
list = MIDL_user_allocate(2 * sizeof(list[0]));
list[0] = MIDL_user_allocate(sizeof(helloW));
lstrcpyW(list[0], helloW);
list[1] = MIDL_user_allocate(sizeof(worldW));
lstrcpyW(list[1], worldW);
*names = list;
*n = 2;
}
int __cdecl s_sum_pcarr2(int n, int **pa)
{
return s_sum_conf_array(*pa, n);
@@ -1190,12 +1221,36 @@ pointer_tests(void)
if (!old_windows_version)
{
int n;
str_array_t names;
wstr_array_t namesw;
name.size = 10;
name.name = buffer = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, name.size);
get_name(&name);
ok(name.name == buffer, "[in,out] pointer should have stayed as %p but instead changed to %p\n", name.name, buffer);
ok(!strcmp(name.name, "Jeremy Wh"), "name didn't unmarshall properly, expected \"Jeremy Wh\", but got \"%s\"\n", name.name);
HeapFree(GetProcessHeap(), 0, name.name);
n = -1;
names = NULL;
get_names(&n, &names);
ok(n == 2, "expected 2, got %d\n", n);
ok(!strcmp(names[0], "Hello"), "expected Hello, got %s\n", names[0]);
ok(!strcmp(names[1], "World!"), "expected World!, got %s\n", names[1]);
MIDL_user_free(names[0]);
MIDL_user_free(names[1]);
MIDL_user_free(names);
n = -1;
namesw = NULL;
get_namesw(&n, &namesw);
ok(n == 2, "expected 2, got %d\n", n);
ok(!lstrcmpW(namesw[0], helloW), "expected Hello, got %s\n", wine_dbgstr_w(namesw[0]));
ok(!lstrcmpW(namesw[1], worldW), "expected World!, got %s\n", wine_dbgstr_w(namesw[1]));
MIDL_user_free(namesw[0]);
MIDL_user_free(namesw[1]);
MIDL_user_free(namesw);
}
pa2 = a;
@@ -1492,58 +1547,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 == RpcStringBindingComposeA(NULL, iptcp, address, port, NULL, &binding), "RpcStringBindingCompose\n");
ok(RPC_S_OK == RpcBindingFromStringBindingA(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 == RpcStringFreeA(&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 == RpcStringBindingComposeA(NULL, iptcp, address, port, NULL, &binding), "RpcStringBindingCompose\n");
ok(RPC_S_OK == RpcBindingFromStringBindingA(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 == RpcStringFreeA(&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 == RpcStringBindingComposeA(NULL, ncalrpc, NULL, guid, NULL, &binding), "RpcStringBindingCompose\n");
ok(RPC_S_OK == RpcBindingFromStringBindingA(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 == RpcStringFreeA(&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 == RpcStringBindingComposeA(NULL, ncalrpc, NULL, guid, NULL, &binding), "RpcStringBindingCompose\n");
ok(RPC_S_OK == RpcBindingFromStringBindingA(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 == RpcStringFreeA(&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 == RpcStringBindingComposeA(NULL, np, address_np, pipe, NULL, &binding), "RpcStringBindingCompose\n");
ok(RPC_S_OK == RpcBindingFromStringBindingA(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 == RpcStringFreeA(&binding), "RpcStringFree\n");
ok(RPC_S_OK == RpcBindingFree(&IServer_IfHandle), "RpcBindingFree\n");
}
}
@@ -1560,13 +1615,13 @@ server(void)
RPC_STATUS status, iptcp_status, np_status, ncalrpc_status;
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);
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);
np_status = RpcServerUseProtseqEp(np, 0, pipe, NULL);
np_status = RpcServerUseProtseqEpA(np, 0, pipe, NULL);
if (np_status == RPC_S_PROTSEQ_NOT_SUPPORTED)
skip("Protocol sequence ncacn_np is not supported\n");
else
@@ -1584,7 +1639,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 = CreateEventW(NULL, FALSE, FALSE, NULL);
ok(stop_event != NULL, "CreateEvent failed with error %d\n", GetLastError());
if (iptcp_status == RPC_S_OK)
+8
View File
@@ -18,6 +18,9 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#pragma makedep client
#pragma makedep server
#include "server_defines.h"
typedef struct tag_vector
@@ -325,6 +328,11 @@ cpp_quote("#endif")
} name_t;
void get_name([in,out] name_t *name);
typedef char **str_array_t;
void get_names([out] int *n, [out, string, size_is(,*n)] str_array_t *names);
typedef WCHAR **wstr_array_t;
void get_namesw([out] int *n, [out, string, size_is(,*n)] wstr_array_t *names);
int sum_pcarr2(int n, [size_is(, n)] int **pa);
int sum_L1_norms(int n, [size_is(n)] vector_t *vs);