mirror of
https://github.com/reactos/reactos.git
synced 2025-01-01 03:54:02 +00:00
[KERNEL32]
FlushFileBuffers: - In spite of what MSDN pretends, it appears that FlushFileBuffers flushes console input buffer when it's called with a console handle. Then, do it here as well. - Get rid of SetLastErrorByStatus here... svn path=/trunk/; revision=50980
This commit is contained in:
parent
5696898543
commit
91bdfab1bd
1 changed files with 9 additions and 9 deletions
|
@ -406,26 +406,26 @@ OpenFile(LPCSTR lpFileName,
|
|||
* @implemented
|
||||
*/
|
||||
BOOL WINAPI
|
||||
FlushFileBuffers(HANDLE hFile)
|
||||
FlushFileBuffers(IN HANDLE hFile)
|
||||
{
|
||||
NTSTATUS errCode;
|
||||
NTSTATUS Status;
|
||||
IO_STATUS_BLOCK IoStatusBlock;
|
||||
|
||||
hFile = TranslateStdHandle(hFile);
|
||||
|
||||
if (IsConsoleHandle(hFile))
|
||||
{
|
||||
return FALSE;
|
||||
return FlushConsoleInputBuffer(hFile);
|
||||
}
|
||||
|
||||
errCode = NtFlushBuffersFile(hFile,
|
||||
&IoStatusBlock);
|
||||
if (!NT_SUCCESS(errCode))
|
||||
Status = NtFlushBuffersFile(hFile,
|
||||
&IoStatusBlock);
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
SetLastErrorByStatus(errCode);
|
||||
return(FALSE);
|
||||
BaseSetLastNTError(Status);
|
||||
return FALSE;
|
||||
}
|
||||
return(TRUE);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue