DosReadConsoleInputEvent

C++ language function declaration

APIRET APIENTRY DosReadConsoleInputEvent ( HFILE Handle, CONSOLE_INPUT_EVENT * Events, size_t MaxEvents, size_t & NumEvents, BOOL remove ) ;

Parameters

Handle
The file handle of the console buffer or CON device. (Note)
Events
A pointer to an array of CONSOLE_INPUT_EVENT stuctures.
MaxEvents
The maximum number of array elements that can be stored.
NumEvents
A reference to a variable wherein is stored the actual number of array elements that have been stored by the call.
Remove
A flag indicating whether or not to remove the input events from the queue.

Return value

An OS/2 system error code.

Remarks

This call blocks until one or more input events are available, and returns up to MaxEvents event structures in the array provided, indicating in NumEvents how many structures were actually filled. At least one event will be returned. (A MaxEvents value less than 1 is a function parameter error.)

Note: The virtual key numbers in a keyboard event are the CON_KBD_KEY_XXX constants, not the VK_XXXX constants defined by the Presentation Manager API.

A key event may have a virtual key code without having a character code, and vice versa. The recommended practice is to first recognise non-character key events by their virtual key codes, and then to process all other key events that have character codes according to their character codes.

See Note.


The 32-bit Unicode Console API is © Copyright 1999,2000,2009 Jonathan de Boyne Pollard. "Moral" rights are asserted.