advapi32/tests: Skip a test when not properly logged in on win9x.

This commit is contained in:
Paul Vriens 2007-08-16 14:07:36 +02:00 committed by Alexandre Julliard
parent 36e416b614
commit 95af1823ca
1 changed files with 8 additions and 1 deletions

View File

@ -1302,8 +1302,15 @@ static void test_LookupAccountName(void)
*/ */
user_size = UNLEN + 1; user_size = UNLEN + 1;
SetLastError(0xdeadbeef);
ret = GetUserNameA(user_name, &user_size); ret = GetUserNameA(user_name, &user_size);
ok(ret, "Failed to get user name\n"); if (!ret && (GetLastError() == ERROR_NOT_LOGGED_ON))
{
/* Probably on win9x where the user used 'Cancel' instead of properly logging in */
skip("Cannot get the user name (win9x and not logged in properly)\n");
return;
}
ok(ret, "Failed to get user name : %d\n", GetLastError());
/* get sizes */ /* get sizes */
sid_size = 0; sid_size = 0;