ws2_32: Use NtStatusToWSAError() in WSAGetOverlappedResult().

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Zebediah Figura 2021-05-06 17:54:06 -05:00 committed by Alexandre Julliard
parent 54a39d5779
commit 5a8dc6cd2e
2 changed files with 4 additions and 9 deletions

View File

@ -5737,7 +5737,7 @@ BOOL WINAPI WSAGetOverlappedResult( SOCKET s, LPWSAOVERLAPPED lpOverlapped,
if ( lpdwFlags )
*lpdwFlags = lpOverlapped->u.s.Offset;
if (status) SetLastError( RtlNtStatusToDosError(status) );
SetLastError( NtStatusToWSAError(status) );
return !status;
}

View File

@ -8701,14 +8701,9 @@ static void test_WSAGetOverlappedResult(void)
}
else
{
todo_wine_if (!NT_SUCCESS(status)
&& LOWORD(status) != WSAEINVAL
&& status != STATUS_CANCELLED
&& status != (0x80070000 | ERROR_IO_INCOMPLETE)
&& status != (0xc0070000 | ERROR_IO_INCOMPLETE))
ok(WSAGetLastError() == expect
|| (status == (0xc0070000 | ERROR_IO_INCOMPLETE) && WSAGetLastError() == WSAEINVAL), /* < win8 */
"status %#x: expected error %u, got %u\n", status, expect, WSAGetLastError());
ok(WSAGetLastError() == expect
|| (status == (0xc0070000 | ERROR_IO_INCOMPLETE) && WSAGetLastError() == WSAEINVAL), /* < win8 */
"status %#x: expected error %u, got %u\n", status, expect, WSAGetLastError());
}
}
}