Commit f4c8a0fa authored by James Hawkins's avatar James Hawkins Committed by Alexandre Julliard

advapi32: ERROR_IO_PENDING is returned in Vista only on success.

parent 3b3f5118
......@@ -97,12 +97,19 @@ static void test_CredWriteA(void)
SetLastError(0xdeadbeef);
ret = pCredWriteA(&new_cred, 0);
ok(!ret, "CredWrite with username without domain should have failed\n");
ok(GetLastError() == ERROR_BAD_USERNAME ||
GetLastError() == ERROR_NO_SUCH_LOGON_SESSION || /* Vista */
broken(GetLastError() == ERROR_IO_PENDING),
"CredWrite with username without domain should return ERROR_BAD_USERNAME"
"or ERROR_NO_SUCH_LOGON_SESSION not %d\n", GetLastError());
if (ret)
{
/* Vista */
ok(GetLastError() == ERROR_IO_PENDING,
"Expected ERROR_IO_PENDING, got %d\n", GetLastError());
}
else
{
ok(GetLastError() == ERROR_BAD_USERNAME ||
GetLastError() == ERROR_NO_SUCH_LOGON_SESSION, /* Vista */
"CredWrite with username without domain should return ERROR_BAD_USERNAME"
"or ERROR_NO_SUCH_LOGON_SESSION not %d\n", GetLastError());
}
new_cred.UserName = NULL;
SetLastError(0xdeadbeef);
......
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