Commit 455e6c64 authored by Sebastian Lackner's avatar Sebastian Lackner Committed by Alexandre Julliard

kernel32: Fix handling of GetOverlappedResult when status remains STATUS_PENDING.

Spotted by Michael Müller. Signed-off-by: 's avatarSebastian Lackner <sebastian@fds-team.de> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent a919a02a
......@@ -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 );
......
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