advapi32: Skip token attribute testing if OpenProcessToken() is not implemented.

This commit is contained in:
Saulius Krasuckas 2006-05-22 00:06:47 +03:00 committed by Alexandre Julliard
parent 18af854764
commit 7b156bf170
1 changed files with 10 additions and 3 deletions

View File

@ -703,11 +703,18 @@ static void test_token_attr(void)
TOKEN_GROUPS *Groups; TOKEN_GROUPS *Groups;
TOKEN_USER *User; TOKEN_USER *User;
BOOL ret; BOOL ret;
DWORD i; DWORD i, GLE;
LPTSTR SidString; LPSTR SidString;
ret = OpenProcessToken(GetCurrentProcess(), TOKEN_QUERY, &Token); ret = OpenProcessToken(GetCurrentProcess(), TOKEN_QUERY, &Token);
ok(ret, "OpenProcessToken failed with error %ld\n", GetLastError()); GLE = GetLastError();
ok(ret || (GLE == ERROR_CALL_NOT_IMPLEMENTED),
"OpenProcessToken failed with error %ld\n", GLE);
if(!ret && (GLE == ERROR_CALL_NOT_IMPLEMENTED))
{
trace("OpenProcessToken() not implemented, skipping test_token_attr()\n");
return;
}
/* groups */ /* groups */
ret = GetTokenInformation(Token, TokenGroups, NULL, 0, &Size); ret = GetTokenInformation(Token, TokenGroups, NULL, 0, &Size);