mirror of
https://github.com/reactos/reactos.git
synced 2024-08-04 18:40:59 +00:00
Check for a valid console handle in SetConsoleMode.
svn path=/trunk/; revision=16535
This commit is contained in:
parent
eb4f7c8b2f
commit
9b991b83fd
|
@ -2605,6 +2605,14 @@ SetConsoleMode(
|
|||
|
||||
NTSTATUS Status;
|
||||
|
||||
if (!IsConsoleHandle (hConsoleHandle))
|
||||
{
|
||||
DPRINT("SetConsoleMode was called with a non console handle\n");
|
||||
SetLastError (ERROR_INVALID_PARAMETER);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
CsrRequest = MAKE_CSR_API(SET_CONSOLE_MODE, CSR_CONSOLE);
|
||||
Request.Data.SetConsoleModeRequest.ConsoleHandle = hConsoleHandle;
|
||||
Request.Data.SetConsoleModeRequest.Mode = dwMode;
|
||||
|
|
Loading…
Reference in a new issue