kernel32: Fix handling of GetOverlappedResult when status remains STATUS_PENDING.
Spotted by Michael Müller. Signed-off-by: Sebastian Lackner <sebastian@fds-team.de> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
a919a02ac3
commit
455e6c64ae
|
@ -625,7 +625,9 @@ BOOL WINAPI GetOverlappedResult(HANDLE hFile, LPOVERLAPPED lpOverlapped,
|
|||
if (WaitForSingleObject( lpOverlapped->hEvent ? lpOverlapped->hEvent : hFile,
|
||||
INFINITE ) == WAIT_FAILED)
|
||||
return FALSE;
|
||||
|
||||
status = lpOverlapped->Internal;
|
||||
if (status == STATUS_PENDING) status = STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
*lpTransferred = lpOverlapped->InternalHigh;
|
||||
|
|
|
@ -3361,6 +3361,11 @@ static void test_overlapped(void)
|
|||
"wrong error %u\n", GetLastError() );
|
||||
ok( r == FALSE, "should return false\n");
|
||||
|
||||
r = GetOverlappedResult( 0, &ov, &result, TRUE );
|
||||
ok( r == TRUE, "should return TRUE\n" );
|
||||
ok( result == 0xabcd, "wrong result %u\n", result );
|
||||
ok( ov.Internal == STATUS_PENDING, "expected STATUS_PENDING, got %08lx\n", ov.Internal );
|
||||
|
||||
ResetEvent( ov.hEvent );
|
||||
|
||||
SetLastError( 0xb00 );
|
||||
|
|
Loading…
Reference in New Issue