[KERNEL32][PSDK][NTVDM][CONSRV] Use now-documented ReadConsoleInputEx() flag names.

Addendum to commit b8b8819c7 (r60920)

ReadConsoleInputEx() and its flags used to be undocumented.
In the meantime they became documented on MSDN, see:
https://learn.microsoft.com/en-us/windows/console/readconsoleinputex

We can therefore adopt these now-documented flag names.
This commit is contained in:
Hermès Bélusca-Maïto 2024-03-06 12:22:40 +01:00
parent c0dbde0436
commit 3a49e26f13
No known key found for this signature in database
GPG key ID: 3B2539C65E7B93D0
4 changed files with 8 additions and 8 deletions

View file

@ -1222,7 +1222,7 @@ PeekConsoleInputW(IN HANDLE hConsoleInput,
lpBuffer, lpBuffer,
nLength, nLength,
lpNumberOfEventsRead, lpNumberOfEventsRead,
CONSOLE_READ_KEEPEVENT | CONSOLE_READ_CONTINUE, CONSOLE_READ_NOREMOVE | CONSOLE_READ_NOWAIT,
TRUE); TRUE);
} }
@ -1242,7 +1242,7 @@ PeekConsoleInputA(IN HANDLE hConsoleInput,
lpBuffer, lpBuffer,
nLength, nLength,
lpNumberOfEventsRead, lpNumberOfEventsRead,
CONSOLE_READ_KEEPEVENT | CONSOLE_READ_CONTINUE, CONSOLE_READ_NOREMOVE | CONSOLE_READ_NOWAIT,
FALSE); FALSE);
} }

View file

@ -119,8 +119,8 @@ extern "C" {
/* /*
* Read input flags * Read input flags
*/ */
#define CONSOLE_READ_KEEPEVENT 0x0001 #define CONSOLE_READ_NOREMOVE 0x0001
#define CONSOLE_READ_CONTINUE 0x0002 #define CONSOLE_READ_NOWAIT 0x0002
/* /*
* Event types * Event types

View file

@ -228,7 +228,7 @@ ConsoleEventThread(LPVOID Parameter)
InputRecords, InputRecords,
ARRAYSIZE(InputRecords), ARRAYSIZE(InputRecords),
&NumRecords, &NumRecords,
CONSOLE_READ_CONTINUE)) CONSOLE_READ_NOWAIT))
{ {
DWORD LastError = GetLastError(); DWORD LastError = GetLastError();
DPRINT1("Error reading console input (0x%p, %lu) - Error %lu\n", ConsoleInput, NumRecords, LastError); DPRINT1("Error reading console input (0x%p, %lu) - Error %lu\n", ConsoleInput, NumRecords, LastError);

View file

@ -537,8 +537,8 @@ ReadInputBuffer(IN PGET_INPUT_INFO InputInfo,
NumEventsRead = 0; NumEventsRead = 0;
Status = ConDrvGetConsoleInput(InputBuffer->Header.Console, Status = ConDrvGetConsoleInput(InputBuffer->Header.Console,
InputBuffer, InputBuffer,
(GetInputRequest->Flags & CONSOLE_READ_KEEPEVENT) != 0, (GetInputRequest->Flags & CONSOLE_READ_NOREMOVE) != 0,
(GetInputRequest->Flags & CONSOLE_READ_CONTINUE ) == 0, (GetInputRequest->Flags & CONSOLE_READ_NOWAIT ) == 0,
InputRecord, InputRecord,
GetInputRequest->NumRecords, GetInputRequest->NumRecords,
&NumEventsRead); &NumEventsRead);
@ -656,7 +656,7 @@ CON_API(SrvGetConsoleInput,
DPRINT("SrvGetConsoleInput\n"); DPRINT("SrvGetConsoleInput\n");
if (GetInputRequest->Flags & ~(CONSOLE_READ_KEEPEVENT | CONSOLE_READ_CONTINUE)) if (GetInputRequest->Flags & ~(CONSOLE_READ_NOREMOVE | CONSOLE_READ_NOWAIT))
{ {
return STATUS_INVALID_PARAMETER; return STATUS_INVALID_PARAMETER;
} }