Author: spetreolle
Date: Wed Oct 26 19:02:32 2011
New Revision: 54257
URL:
http://svn.reactos.org/svn/reactos?rev=54257&view=rev
Log:
[KERNEL32]
CreateFile has to set last error on success.
Fixes kernel32:file test cancellation.
Modified:
trunk/reactos/dll/win32/kernel32/client/file/create.c
Modified: trunk/reactos/dll/win32/kernel32/client/file/create.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/client/…
==============================================================================
--- trunk/reactos/dll/win32/kernel32/client/file/create.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/kernel32/client/file/create.c [iso-8859-1] Wed Oct 26 19:02:32
2011
@@ -146,7 +146,7 @@
|| 0 == _wcsicmp(L"CONIN$", lpFileName))
{
return OpenConsoleW(lpFileName,
- dwDesiredAccess,
+ dwDesiredAccess,
lpSecurityAttributes ? lpSecurityAttributes->bInheritHandle
: FALSE,
FILE_SHARE_READ | FILE_SHARE_WRITE);
}
@@ -367,6 +367,10 @@
{
SetLastError(IoStatusBlock.Information == FILE_OVERWRITTEN ? ERROR_ALREADY_EXISTS :
0);
}
+ else
+ {
+ SetLastError(0);
+ }
return FileHandle;
}