A IRP_MJ_READ request transfers data from the Kbdclass input data queue to a client.
The raw input thread in the Microsoft Win32 subsystem sends read requests to obtain keyboard input.
The Parameters.Read.Length member specifies the size, in bytes, of zero or more KEYBOARD_INPUT_DATA structures.
The AssociatedIrp.SystemBuffer member points to the output buffer that is allocated by the Win32 subsystem to output the requested number of KEYBOARD_INPUT_DATA structures.
I/O Status Block
The Information member specifies the number of bytes that are transferred to the Win32 subsystem output buffer. The number of bytes that are transferred is the smallest of the requested number of bytes and the number of bytes currently in the internal data queue.
The Status member is set to one of the following values:
At least one KEYBOARD_INPUT_DATA structure was transferred.
The number of requested bytes is not an integer multiple of the size, in bytes, of a KEYBOARD_INPUT_DATA structure.
The request was canceled before the transfer actually took place.
The device has been removed.
The requesting subsystem does not have read privileges.
The IRP_MJ_READ request transfers zero or more KEYBOARD_INPUT_DATA structures from Kbdclass's internal data queue to the Win32 subsystem buffer. If there is no data in the data queue, a read request remains pending until it is completed or canceled.
Kbdclass completes a read request and does not send the request down the device stack.
A read request can be canceled. If a cleanup is in progress when a read request is received, no action is taken.
Note that a read request can be completed successfully only if the request was made by a trusted subsystem. Kbdclass performs a privilege check to enforce this restriction. The Win32 subsystem is currently the only trusted subsystem.
|Ntddk.h (include Wdm.h, Ntddk.h, or Wdm.h)|