Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
This article 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.