共用方式為


IRP_MJ_CLOSE (Mouclass)

The IR_MJ_CLOSE request closes a mouse device.

When Sent

The Microsoft Win32 subsystem sends a close request before a mouse device is removed or the system shuts down.

Input Parameters

None.

Output Parameters

None.

I/O Status Block

How Mouclass sets the Information member and the Status member of the I/O status block of the IRP depends on whether the mouse is a Plug and Play (PnP) device or a nonPnP device, as follows:

  • PnP Operation
    The Information member is set to zero.

    Mouclass sets the Status member to STATUS_SUCCESS or to the status returned by the function driver for the IRP_MJ_CLOSE request.

  • NonPnP Operation
    The Information member is set to zero.

    The Status member is set to STATUS_SUCCESS or to the status returned by the port driver for the IOCTL_INTERNAL_MOUSE_DISABLE request.

Operation

How Mouclass closes a mouse depends on whether the mouse is a PnP device or a nonPnP device, as follows:

  • PnP Operation
    Mouclass sends the request down the device stack and clears the "trusted" file that is permitted read access to the device. If there is a grandmaster device, Mouclass sends a request to close to all the ports associated with the subordinate class devices.

  • NonPnP operation
    Mouclass sends an IOCTL_INTERNAL_MOUSE_DISABLE request to the port driver. Mouclass also clears the "trusted" file that is permitted read access to the device.

Requirements

Header

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

See also

IRP_MJ_CLOSE

IRP_MJ_CREATE (Mouclass)

 

 

Send comments about this topic to Microsoft