[KERNEL32]

Use ERROR_SUCCESS instead of 0.
Dedicated to Pierre.

svn path=/trunk/; revision=54258
This commit is contained in:
Sylvain Petreolle 2011-10-27 09:38:14 +00:00
parent 7d118f02b6
commit 3c1d785188

View file

@ -361,15 +361,15 @@ HANDLE WINAPI CreateFileW (LPCWSTR lpFileName,
*/ */
if (dwCreationDisposition == FILE_OPEN_IF) if (dwCreationDisposition == FILE_OPEN_IF)
{ {
SetLastError(IoStatusBlock.Information == FILE_OPENED ? ERROR_ALREADY_EXISTS : 0); SetLastError(IoStatusBlock.Information == FILE_OPENED ? ERROR_ALREADY_EXISTS : ERROR_SUCCESS);
} }
else if (dwCreationDisposition == FILE_OVERWRITE_IF) else if (dwCreationDisposition == FILE_OVERWRITE_IF)
{ {
SetLastError(IoStatusBlock.Information == FILE_OVERWRITTEN ? ERROR_ALREADY_EXISTS : 0); SetLastError(IoStatusBlock.Information == FILE_OVERWRITTEN ? ERROR_ALREADY_EXISTS : ERROR_SUCCESS);
} }
else else
{ {
SetLastError(0); SetLastError(ERROR_SUCCESS);
} }
return FileHandle; return FileHandle;