Share via


IRP_MJ_CREATE (Mouclass)

The IRP_MJ_CREATE request opens a mouse device.

When Sent

The Microsoft Win32 subsystem opens all mouse devices for its exclusive use during a system boot or after a new mouse device is installed. This request is also sent when a user switch is requested.

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 of the IRP is set to zero.

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

    • STATUS_SUCCESS
      The request completed successfully.

    • STATUS_UNSUCCESFFUL
      The device is not started.

    • STATUS_Xxx
      A lower-level driver returned an error status.

  • NonPnP Operation
    The Information member is set to zero.

    The Status member is set to STATUS_SUCCESS or the status returned by a lower-level driver for the IOCTL_INTERNAL_MOUSE_ENABLE request.

Operation

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

  • PnP Operation
    If the device is started, Mouclass sends the IRP_MJ_CREATE request down the device stack. If the device is not started, Mouclass completes the request without sending the request down the driver stack. Mouclass sets the "trusted" file that is permitted read access to the device. If there is a grandmaster device, Mouclass sends a create request to all the mouse devices associated with the subordinate class device objects.

  • NonPnP Operation
    Mouclass sends a synchronous IOCTL_INTERNAL_MOUSE_ENABLE request down the device stack.

Requirements

Header

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

See also

IRP_MJ_CLOSE (Mouclass)

IRP_MJ_CREATE

 

 

Send comments about this topic to Microsoft