mirror of
https://github.com/reactos/reactos.git
synced 2026-05-31 16:31:07 +08:00
[CONSRV] Use NtClearEvent() and NtClose() instead of the Win32 functions.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user