From 301809cb8d9f55ef2631bbb9b2ce4dee67d76bf7 Mon Sep 17 00:00:00 2001 From: Johannes Anderwald Date: Fri, 17 Feb 2012 16:11:40 +0000 Subject: [PATCH] [KERNEL32] - Fix error status of GetQueuedCompletionStatus, which should set the error to WAIT_TIMEOUT - Fixes 4 failing winetests - Patch by Samuel Serapion (samcharly_hotmail_com) See issue #6907 for more details. svn path=/trunk/; revision=55673 --- reactos/dll/win32/kernel32/client/file/iocompl.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/reactos/dll/win32/kernel32/client/file/iocompl.c b/reactos/dll/win32/kernel32/client/file/iocompl.c index 554c9fd1853..fba6765b283 100644 --- a/reactos/dll/win32/kernel32/client/file/iocompl.c +++ b/reactos/dll/win32/kernel32/client/file/iocompl.c @@ -123,7 +123,12 @@ GetQueuedCompletionStatus( if (!NT_SUCCESS(errCode) || errCode == STATUS_TIMEOUT) { *lpOverlapped = NULL; - BaseSetLastNTError(errCode); + + if(errCode == STATUS_TIMEOUT) + SetLastError(WAIT_TIMEOUT); + else + BaseSetLastNTError(errCode); + return FALSE; }