Table of contents
TOC
Collapse the table of content
Expand the table of content

Initializing HID Reports

Last Updated: 4/22/2017

This section describes how user-mode applications and kernel-mode drivers initialize a HID report before using the HIDClass support routines or the HID class driver IOCTLs.

To initialize a report buffer, an application or driver creates a zero-initialized buffer of the required size, in bytes, for the report type. The XxxReportByteLength members of a HID collection's HIDP_CAPS structure specify the required size of input, output, and feature reports. After initializing a report buffer, an application or driver can use HidP_SetXxx routines to set control data in the report. On the first use of a report, the HidP_SetXxx routines set the report ID to the one associated with a specified HID usage. If the application or driver subsequently attempts to set a usage that is incompatible with the report ID, the HidP_SetXxx routines return a status of HIDP_STATUS_INCOMPATIBLE_REPORT_ID.


Send comments about this topic to Microsoft

© 2017 Microsoft