共用方式為


IRP_MJ_READ (Mouclass)

A IRP_MJ_READ request transfers data from the Mouclass input data queue to a client.

When Sent

The Microsoft Win32 subsystem sends read requests to obtain mouse input.

Input Parameters

Parameters.Read.Length member specifies the size, in bytes, of zero or more of MOUSE_INPUT_DATA structures.

Output Parameters

The AssociatedIrp.SystemBuffer member points to an output buffer that is allocated by the Win32 subsystem to output the requested number of MOUSE_INPUT_DATA structures.

I/O Status Block

The Information member specifies the number of bytes transferred to the Win32 subsystem buffer. The number of bytes that are transferred is the smaller of the requested number of bytes or the number of bytes currently in the data queue.

The Status member is set to one of the following values:

  • STATUS_SUCCESS
    At least one MOUSE_INPUT_DATA structure was transferred.

  • STATUS_BUFFER_TOO_SMALL
    The number of requested bytes is not an integer multiple of the size, in bytes, of a MOUSE_INPUT_DATA structure.

  • STATUS_PRIVILEGE_NOT_HELD
    The requester does not have read privileges.

  • STATUS_CANCELLED
    The request was canceled before the transfer actually took place.

Operation

The IRP_MJ_READ request transfers zero or more MOUSE_INPUT_DATA structures from the 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.

The read request is not sent down the device stack and is completed by Mouclass.

A read request can be canceled. A read request is not executed if a cleanup is in progress when the request is received.

Note that a read request can be completed successfully only if it is made by a "trusted" subsystem. The Win32 subsystem is currently the only "trusted" subsystem. Mouclass performs a privilege check to enforce this restriction.

Requirements

Header

Ntddk.h (include Wdm.h, Ntddk.h, or Wdm.h)

See also

IRP_MJ_READ

 

 

Send comments about this topic to Microsoft