ok(status == RPC_S_OK, "return wrong\n");
status = RpcMgmtStopServerListening(NULL);
-todo_wine {
ok(status == RPC_S_NOT_LISTENING,
"wrong RpcMgmtStopServerListening error (%u)\n", status);
-}
status = RpcMgmtWaitServerListen();
ok(status == RPC_S_NOT_LISTENING,
ok(status == RPC_S_OK, "RpcServerRegisterIf failed (%u)\n", status);
status = RpcServerListen(1, 20, TRUE);
-todo_wine {
ok(status == RPC_S_OK, "RpcServerListen failed (%u)\n", status);
-}
status = RpcServerListen(1, 20, TRUE);
todo_wine {
RPC_STATUS rpc_status;
BOOL w2k3_up = FALSE;
- /* Windows 2003 and Vista return STATUS_UNSUCCESSFUL if given an unknown status */
+ /* Windows 2003 and above return STATUS_UNSUCCESSFUL if given an unknown status */
win32status = I_RpcMapWin32Status(9999);
if (win32status == STATUS_UNSUCCESSFUL)
- {
- trace("We are on Windows 2003 or Vista\n");
w2k3_up = TRUE;
- }
/* On Windows XP-SP1 and below some statuses are not mapped and return
* the given status
if (!pI_RpcExceptionFilter)
{
- skip("I_RpcExceptionFilter not exported\n");
+ win_skip("I_RpcExceptionFilter not exported\n");
return;
}
case STATUS_ACCESS_VIOLATION:
case STATUS_ILLEGAL_INSTRUCTION:
case STATUS_PRIVILEGED_INSTRUCTION:
- case 0xc00000aa /* STATUS_INSTRUCTION_MISALIGNMENT */:
+ case STATUS_INSTRUCTION_MISALIGNMENT:
case STATUS_STACK_OVERFLOW:
- case 0xc0000194 /* STATUS_POSSIBLE_DEADLOCK */:
+ case STATUS_POSSIBLE_DEADLOCK:
ok(retval == EXCEPTION_CONTINUE_SEARCH, "I_RpcExceptionFilter(0x%x) should have returned %d instead of %d\n",
exception, EXCEPTION_CONTINUE_SEARCH, retval);
break;
UUID guid1;
BYTE version;
RPC_STATUS (WINAPI *pUuidCreateSequential)(UUID *) = (void *)GetProcAddress(GetModuleHandleA("rpcrt4.dll"), "UuidCreateSequential");
+ RPC_STATUS (WINAPI *pI_UuidCreate)(UUID *) = (void*)GetProcAddress(GetModuleHandleA("rpcrt4.dll"), "I_UuidCreate");
RPC_STATUS ret;
if (!pUuidCreateSequential)
{
- skip("UuidCreateSequential not exported\n");
+ win_skip("UuidCreateSequential not exported\n");
return;
}
+
+ ok(pI_UuidCreate != pUuidCreateSequential, "got %p, %p\n", pI_UuidCreate, pUuidCreateSequential);
+
ret = pUuidCreateSequential(&guid1);
ok(!ret || ret == RPC_S_UUID_LOCAL_ONLY,
"expected RPC_S_OK or RPC_S_UUID_LOCAL_ONLY, got %08x\n", ret);
/* If the call succeeded, there's a valid (non-multicast) MAC
* address in the uuid:
*/
- ok(!(guid1.Data4[2] & 0x01),
+ ok(!(guid1.Data4[2] & 0x01) || broken(guid1.Data4[2] & 0x01), /* Win 8.1 */
"GUID does not appear to contain a MAC address: %s\n",
wine_dbgstr_guid(&guid1));
}
ok(!memcmp(guid1.Data4, guid2.Data4, sizeof(guid2.Data4)),
"unexpected value in MAC address: %s\n",
wine_dbgstr_guid(&guid2));
+
+ /* I_UuidCreate does exactly the same */
+ pI_UuidCreate(&guid2);
+ version = (guid2.Data3 & 0xf000) >> 12;
+ ok(version == 1, "unexpected version %d\n", version);
+ ok(!memcmp(guid1.Data4, guid2.Data4, sizeof(guid2.Data4)),
+ "unexpected value in MAC address: %s\n",
+ wine_dbgstr_guid(&guid2));
}
}
{
RPC_STATUS ret;
RPC_CSTR principal, saved_principal;
- BOOLEAN (WINAPI *pGetUserNameExA)(EXTENDED_NAME_FORMAT,LPSTR,PULONG);
char *username;
ULONG len = 0;
- pGetUserNameExA = (void *)GetProcAddress( LoadLibraryA("secur32.dll"), "GetUserNameExA" );
- if (!pGetUserNameExA)
- {
- win_skip( "GetUserNameExA not exported\n" );
- return;
- }
- pGetUserNameExA( NameSamCompatible, NULL, &len );
+ GetUserNameExA( NameSamCompatible, NULL, &len );
username = HeapAlloc( GetProcessHeap(), 0, len );
- pGetUserNameExA( NameSamCompatible, username, &len );
+ GetUserNameExA( NameSamCompatible, username, &len );
ret = RpcServerInqDefaultPrincNameA( 0, NULL );
ok( ret == RPC_S_UNKNOWN_AUTHN_SERVICE, "got %u\n", ret );
HeapFree( GetProcessHeap(), 0, username );
}
+static void test_RpcServerRegisterAuthInfo(void)
+{
+ RPC_STATUS status;
+
+ status = RpcServerRegisterAuthInfoW(NULL, 600, NULL, NULL);
+ ok(status == RPC_S_UNKNOWN_AUTHN_SERVICE, "status = %x\n", status);
+}
+
START_TEST( rpc )
{
UuidConversionAndComparison();
test_UuidCreateSequential();
test_RpcBindingFree();
test_RpcServerInqDefaultPrincName();
+ test_RpcServerRegisterAuthInfo();
}