HID Class Driver IOCTLs

This section describes the IOCTLs that the HID class driver supports for top-level collections.

Although user applications can communicate with the HID class driver by using HidD_Xxx  HIDClass support routines, kernel-mode drivers must send the corresponding device control requests described in this section.

The input and output parameters are request-specific.

Upon completion of a request, the I/O status block members are set as follows:

  • The Status member is set by the HID class driver for all requests that it handles.

  • As described for each IOCTL, the Information member is set either by the class driver or a lower-level driver. Normally, when a lower-level driver transfers data from or to a device, the lower-level driver sets Information to the number of bytes transferred. However, the HID class driver might return a different value.

In this section



The IOCTL_GET_NUM_DEVICE_INPUT_BUFFERS request obtains the size of the input report queue for a top-level collection.


The IOCTL_GET_PHYSICAL_DESCRIPTOR request obtains the physical descriptor of a top-level collection.


The IOCTL_HID_DEVICERESET_NOTIFICATION request is sent by the HID client driver to HID class driver to wait for a device-initiated reset event.


The IOCTL_HID_DISABLE_SECURE_READ request cancels an IOCTL_HID_ENABLE_SECURE_READ request for a HID collection.


The IOCTL_HID_ENABLE_SECURE_READ request enables a secure read for open files of a HID collection.


The IOCTL_HID_ENABLE_WAKE_ON_SX request is used to indicate the requirement for a device to be able to wake from system sleep.


The IOCTL_HID_FLUSH_QUEUE request dequeues all of the unparsed input reports from a top-level collection's input report queue.


The IOCTL_HID_GET_COLLECTION_DESCRIPTOR request obtains a top-level collection's preparsed data, which the HID class driver extracted from the physical device's report descriptor during device initialization.


The IOCTL_HID_GET_COLLECTION_INFORMATION request obtains a top-level collection's HID_COLLECTION_INFORMATION structure.


The IOCTL_HID_GET_DRIVER_CONFIG request retrieves the driver configuration.


The IOCTL_HID_GET_FEATURE request returns a feature report associated with a top-level collection.


The IOCTL_HID_GET_HARDWARE_ID request obtains the Plug and Play hardware ID of a top-level collection.


The IOCTL_HID_GET_INDEXED_STRING request obtains a specified embedded string from a top-level collection.


The IOCTL_HID_GET_INPUT_REPORT request obtains an input report from a top-level collection.


The IOCTL_HID_GET_MANUFACTURER_STRING request obtains a top-level collection's embedded string that identifies the manufacturer of the device.


The IOCTL_HID_GET_MS_GENRE_DESCRIPTOR request is used for retrieving the genre descriptor for the device.


The IOCTL_HID_GET_POLL_FREQUENCY_MSEC request obtains the current polling frequency, in milliseconds, of a top-level collection.


The IOCTL_HID_GET_PRODUCT_STRING request obtains a top-level collection's embedded string that identifies the manufacturer's product. The retrieved string is a NULL-terminated wide character string in a human-readable format.

For general information about HIDClass devices, see HID Collections.


The IOCTL_HID_GET_SERIALNUMBER_STRING request obtains a top-level collection's embedded string that identifies the device's serial number.


The IOCTL_HID_SET_DRIVER_CONFIG request sets the driver configuration.


The IOCTL_HID_SET_FEATURE request sends a feature report to a top-level collection.

For general information about HIDClass devices, see HID Collections.


The IOCTL_HID_SET_OUTPUT_REPORT request sends an output report to a top-level collection.


The IOCTL_HID_SET_POLL_FREQUENCY_MSEC request sets the polling frequency, in milliseconds, for a top-level collection.

User-mode applications or kernel-mode drivers that perform irregular, opportunistic reads on a polled device must furnish a polling interval of zero. In such cases, IOCTL_HID_SET_POLL_FREQUENCY_MSEC does not actually change the polling frequency of the device; but if the report data is not stale when it is read, the read is completed immediately with the latest report data for the indicated collection. If the report data is stale, it is refreshed immediately, without waiting for the expiration of the polling interval, and the read is completed with the new data.

If the value for the polling interval that is provided in the IRP is not zero, it must be >= MIN_POLL_INTERVAL_MSEC and <= MAX_POLL_INTERVAL_MSEC.

Polling may be limited if there are multiple top-level collections.

For general information about HIDClass devices, see HID Collections.


The IOCTL_HID_SET_S0_IDLE_TIMEOUT request is used by a client to inform the HID class driver about the client's preferred idle timeout value.


The IOCTL_SET_NUM_DEVICE_INPUT_BUFFERS request sets the number of buffers for the input report queue of a top-level collection.

Each input report queue is implemented as a ring buffer. If a collection transmits data to the HID class driver faster than the driver can read it, some of the data may be lost. To prevent this type of loss, you can use an IOCTL_SET_NUM_DEVICE_INPUT_BUFFERS request to adjust the number of buffers that the input report queue contains. The HID class driver requires a minimum of two input buffers. On Windows 2000, the maximum number of input buffers that the HID class driver supports is 200, and on Windows XP and later, the maximum number of input buffers that the HID class driver supports is 512. The default number of input buffers is 32.

For general information about HIDClass devices, see HID Collections.




Send comments about this topic to Microsoft