The system-supplied mouse class driver passes most IRP_MJ_DEVICE_CONTROL requests on to the underlying port driver as IRP_MJ_INTERNAL_DEVICE_CONTROL requests. In addition, the class driver communicates with the port driver using driver-defined I/O control codes and driver-created IRPs set up with IRP_MJ_INTERNAL_DEVICE_CONTROL and one of the IOCTL_INTERNAL_MOUSE_XXX shown in the following summary.
IOCTL_MOUSE_QUERY_ATTRIBUTES
Operation
The mouse class driver passes this request on to the port driver, which returns the MOUSE_ATTRIBUTES information.
Input
Parameters.DeviceIoControl.OutputBufferLength indicates the size in bytes of the output buffer, which must be >= sizeof(MOUSE_ATTRIBUTES).
Output
The driver returns the MOUSE_ATTRIBUTES data to the buffer at Irp->AssociatedIrp.SystemBuffer.
I/O Status Block
The Information field is set to the number of bytes of returned attribute data if the Status field is set to STATUS_SUCCESS. Otherwise, the Status field can be set to STATUS_INVALID_PARAMETER or to STATUS_BUFFER_TOO_SMALL.
IOCTL_MOUSE_INSERT_DATA
Operation
None. This request is intercepted within the Win32 subsystem.
IOCTL_INTERNAL_MOUSE_CONNECT
Operation
After the class driver has opened the device object representing the mouse port, the class driver sets up and sends this request to the port driver in order to establish a connection to the port device.
Input
The buffer at Parameters.DeviceIoControl.Type3InputBuffer contains the CONNECT_DATA, including a pointer to the class device object and a pointer to the class service callback routine. Parameters.DeviceIoControl.InputBufferLength in the I/O stack location of the IRP indicates the input buffer’s size in bytes.
Output
None
I/O Status Block
The Information field is set to zero, whether the Status field is set to STATUS_SUCCESS or to STATUS_NO_SUCH_DEVICE if the device is not present, to STATUS_SHARING_VIOLATION if the device is already connected, or to STATUS_INVALID_PARAMETER if the connection data is not valid.
IOCTL_INTERNAL_MOUSE_DISCONNECT
Operation
None. Currently, the mouse device cannot be unloaded dynamically so this request is never sent to the port driver.
IOCTL_INTERNAL_MOUSE_ENABLE
Operation
Enables mouse interrupts at the request of the class driver, which has just been sent a create request.
Input
None
Output
None
I/O Status Block
The Information field is set to zero. The Status field is set to STATUS_SUCCESS or to STATUS_DEVICE_DATA_ERROR if the device interrupt could not be enabled.
IOCTL_INTERNAL_MOUSE_DISABLE
Operation
Disables mouse interrupts at the request of the class driver, which has just been sent a close request.
Input
None
Output
None
I/O Status Block
The Information field is set to zero. The Status field is set to STATUS_SUCCESS or to STATUS_DEVICE_DATA_ERROR if the device interrupt could not be disabled or was already disabled.