kernel32: Fix WaitForMultipleObjectsEx for handles with lower 2 bits set.

This commit is contained in:
Peter Oberndorfer 2010-09-22 19:53:16 +02:00 committed by Alexandre Julliard
parent 4f2afdd0ac
commit f30b708916
2 changed files with 4 additions and 7 deletions

View File

@ -180,11 +180,8 @@ DWORD WINAPI WaitForMultipleObjectsEx( DWORD count, const HANDLE *handles,
*/ */
if (is_console_handle(hloc[i])) if (is_console_handle(hloc[i]))
{ {
if (!VerifyConsoleIoHandle(hloc[i])) if (VerifyConsoleIoHandle(hloc[i]))
{ hloc[i] = GetConsoleInputWaitHandle();
return FALSE;
}
hloc[i] = GetConsoleInputWaitHandle();
} }
} }

View File

@ -978,7 +978,7 @@ static void test_WaitForSingleObject(void)
SetLastError(0xdeadbeef); SetLastError(0xdeadbeef);
ret = WaitForSingleObject(modify_handle(invalid, 3), 0); ret = WaitForSingleObject(modify_handle(invalid, 3), 0);
todo_wine ok(ret == WAIT_FAILED, "expected WAIT_FAILED, got %d\n", ret); ok(ret == WAIT_FAILED, "expected WAIT_FAILED, got %d\n", ret);
ok(GetLastError() == ERROR_INVALID_HANDLE, "expected ERROR_INVALID_HANDLE, got %d\n", GetLastError()); ok(GetLastError() == ERROR_INVALID_HANDLE, "expected ERROR_INVALID_HANDLE, got %d\n", GetLastError());
/* valid handle with different values for lower 2 bits */ /* valid handle with different values for lower 2 bits */
@ -999,7 +999,7 @@ static void test_WaitForSingleObject(void)
SetLastError(0xdeadbeef); SetLastError(0xdeadbeef);
ret = WaitForSingleObject(modify_handle(nonsignaled, 3), 0); ret = WaitForSingleObject(modify_handle(nonsignaled, 3), 0);
todo_wine ok(ret == WAIT_TIMEOUT, "expected WAIT_TIMEOUT, got %d\n", ret); ok(ret == WAIT_TIMEOUT, "expected WAIT_TIMEOUT, got %d\n", ret);
todo_wine ok(GetLastError() == 0xdeadbeef, "expected 0xdeadbeef, got %d\n", GetLastError()); todo_wine ok(GetLastError() == 0xdeadbeef, "expected 0xdeadbeef, got %d\n", GetLastError());
/* valid handle with different values for lower 2 bits */ /* valid handle with different values for lower 2 bits */