https://git.reactos.org/?p=reactos.git;a=commitdiff;h=31c13e89fe5942cfba167…
commit 31c13e89fe5942cfba167d4c5f3c6e41a191faaf
Author: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org>
AuthorDate: Sat Feb 29 20:11:09 2020 +0100
Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org>
CommitDate: Mon Mar 2 01:08:40 2020 +0100
[CONSRV] Use NtClearEvent() and NtClose() instead of the Win32 functions.
---
win32ss/user/winsrv/consrv/condrv/coninput.c | 8 ++++----
win32ss/user/winsrv/consrv/condrv/console.c | 2 +-
win32ss/user/winsrv/consrv/frontends/terminal.c | 4 ++--
3 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/win32ss/user/winsrv/consrv/condrv/coninput.c
b/win32ss/user/winsrv/consrv/condrv/coninput.c
index a2041a0eae9..63549ec4511 100644
--- a/win32ss/user/winsrv/consrv/condrv/coninput.c
+++ b/win32ss/user/winsrv/consrv/condrv/coninput.c
@@ -185,7 +185,7 @@ PurgeInputBuffer(IN PCONSOLE_INPUT_BUFFER InputBuffer)
ConsoleFreeHeap(Event);
}
- // CloseHandle(Console->InputBuffer.ActiveEvent);
+ // NtClose(Console->InputBuffer.ActiveEvent);
}
NTSTATUS NTAPI
@@ -221,7 +221,7 @@ VOID NTAPI
ConDrvDeinitInputBuffer(IN PCONSOLE Console)
{
PurgeInputBuffer(&Console->InputBuffer);
- CloseHandle(Console->InputBuffer.ActiveEvent);
+ NtClose(Console->InputBuffer.ActiveEvent);
}
@@ -317,7 +317,7 @@ ConDrvGetConsoleInput(IN PCONSOLE Console,
if (IsListEmpty(&InputBuffer->InputEvents))
{
- ResetEvent(InputBuffer->ActiveEvent);
+ NtClearEvent(InputBuffer->ActiveEvent);
}
// FIXME: If we add back UNICODE support, it's here that we need to do the
translation.
@@ -365,7 +365,7 @@ ConDrvFlushConsoleInputBuffer(IN PCONSOLE Console,
/* Discard all entries in the input event queue */
PurgeInputBuffer(InputBuffer);
- ResetEvent(InputBuffer->ActiveEvent);
+ NtClearEvent(InputBuffer->ActiveEvent);
return STATUS_SUCCESS;
}
diff --git a/win32ss/user/winsrv/consrv/condrv/console.c
b/win32ss/user/winsrv/consrv/condrv/console.c
index 50542ec3025..e763a812553 100644
--- a/win32ss/user/winsrv/consrv/condrv/console.c
+++ b/win32ss/user/winsrv/consrv/condrv/console.c
@@ -409,7 +409,7 @@ ConDrvDeleteConsole(IN PCONSOLE Console)
/* Deinitialize the input buffer */
ConDrvDeinitInputBuffer(Console);
- if (Console->UnpauseEvent) CloseHandle(Console->UnpauseEvent);
+ if (Console->UnpauseEvent) NtClose(Console->UnpauseEvent);
DPRINT("ConDrvDeleteConsole - Unlocking\n");
LeaveCriticalSection(&Console->Lock);
diff --git a/win32ss/user/winsrv/consrv/frontends/terminal.c
b/win32ss/user/winsrv/consrv/frontends/terminal.c
index ece6bb29933..7cb89e6b221 100644
--- a/win32ss/user/winsrv/consrv/frontends/terminal.c
+++ b/win32ss/user/winsrv/consrv/frontends/terminal.c
@@ -365,7 +365,7 @@ ConSrvTermReadStream(IN OUT PTERMINAL This,
CurrentEntry = RemoveHeadList(&InputBuffer->InputEvents);
if (IsListEmpty(&InputBuffer->InputEvents))
{
- ResetEvent(InputBuffer->ActiveEvent);
+ NtClearEvent(InputBuffer->ActiveEvent);
}
Input = CONTAINING_RECORD(CurrentEntry, ConsoleInput, ListEntry);
@@ -430,7 +430,7 @@ ConSrvTermReadStream(IN OUT PTERMINAL This,
CurrentEntry = RemoveHeadList(&InputBuffer->InputEvents);
if (IsListEmpty(&InputBuffer->InputEvents))
{
- ResetEvent(InputBuffer->ActiveEvent);
+ NtClearEvent(InputBuffer->ActiveEvent);
}
Input = CONTAINING_RECORD(CurrentEntry, ConsoleInput, ListEntry);