Operating HID Collections

This section describes how user-mode applications and kernel-mode drivers operate HID collections.

In general, a user-mode application does the following:

  • Calls device installation functions (SetupDiXxx functions) to find and identify a HID collection.

  • Calls CreateFile to open a file on a HID collection.

  • Calls **HidD_**Xxx HID support routines to obtain a HID collection's preparsed data and information about the HID collection.

  • Calls ReadFile to read input reports and WriteFile to send output reports.

  • Calls **HidP_**Xxx HID support routines to interpret HID reports.

In general, a kernel-mode driver does the following:

  • Finds and identifies a HID collection

    If the driver is a function or filter driver, it is already attached to the collection's device stack. However, if the driver is not attached to the collection's device stack, the driver can use Plug and Play notification.

  • Uses an IRP_MJ_CREATE request to open the HID collection

  • Uses IOCTL_HID_Xxx requests to obtain the HID collection's preparsed data and information about the HID collection

  • Uses IRP_MJ_READ requests to read input reports and IRP_MJ_WRITE requests to send output reports

  • Calls **HidP_**Xxx HID support routines to interpret HID reports

For more information about operating a HID collection, see:

Finding and Opening a HID Collection

Enforcing a Secure Read For a HID Collection

Obtaining Preparsed Data

Obtaining Collection Information

Handling HID Reports

Freeing Resources

 

 

Send comments about this topic to Microsoft

Build date: 4/28/2012