[KERNEL32]
authorJohannes Anderwald <johannes.anderwald@reactos.org>
Fri, 17 Feb 2012 16:11:40 +0000 (16:11 +0000)
committerJohannes Anderwald <johannes.anderwald@reactos.org>
Fri, 17 Feb 2012 16:11:40 +0000 (16:11 +0000)
- 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

index 554c9fd..fba6765 100644 (file)
@@ -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;
    }