mirror of
https://github.com/reactos/reactos.git
synced 2024-12-27 09:34:43 +00:00
fixed bug in FreeConsole()
svn path=/trunk/; revision=382
This commit is contained in:
parent
5d97b74881
commit
97c260445b
1 changed files with 11 additions and 3 deletions
|
@ -199,8 +199,16 @@ FreeConsole( VOID )
|
||||||
}
|
}
|
||||||
SetLastError(ERROR_SUCCESS);
|
SetLastError(ERROR_SUCCESS);
|
||||||
CloseHandle(StdInput);
|
CloseHandle(StdInput);
|
||||||
|
|
||||||
|
if (StdError != INVALID_HANDLE_VALUE)
|
||||||
|
{
|
||||||
|
if (StdError != StdOutput)
|
||||||
|
CloseHandle(StdError);
|
||||||
|
StdError = INVALID_HANDLE_VALUE;
|
||||||
|
}
|
||||||
|
|
||||||
CloseHandle(StdOutput);
|
CloseHandle(StdOutput);
|
||||||
CloseHandle(StdError);
|
|
||||||
#ifdef EXTENDED_CONSOLE
|
#ifdef EXTENDED_CONSOLE
|
||||||
CloseHandle(StdAux);
|
CloseHandle(StdAux);
|
||||||
CloseHandle(StdPrint);
|
CloseHandle(StdPrint);
|
||||||
|
@ -263,8 +271,8 @@ SetConsoleCursorPosition(
|
||||||
ConsoleScreenBufferInfo.dwCursorPosition.Y = dwCursorPosition.Y;
|
ConsoleScreenBufferInfo.dwCursorPosition.Y = dwCursorPosition.Y;
|
||||||
|
|
||||||
if( !DeviceIoControl(
|
if( !DeviceIoControl(
|
||||||
hConsoleOutput,
|
hConsoleOutput,
|
||||||
IOCTL_CONSOLE_SET_SCREEN_BUFFER_INFO,
|
IOCTL_CONSOLE_SET_SCREEN_BUFFER_INFO,
|
||||||
&ConsoleScreenBufferInfo,
|
&ConsoleScreenBufferInfo,
|
||||||
sizeof(CONSOLE_SCREEN_BUFFER_INFO),
|
sizeof(CONSOLE_SCREEN_BUFFER_INFO),
|
||||||
NULL,
|
NULL,
|
||||||
|
|
Loading…
Reference in a new issue