Share via


HID Report Initialization

Other versions of this page are also available for the following:

Windows Mobile Not SupportedWindows Embedded CE Supported

8/28/2008

To initialize a report buffer, create 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, use the HidP_SetXXX functions to set control data in the report. On the first use of a report, the HidP_SetXXX functions set the report identifier to the one associated with a specified HID usage. If the HID client driver subsequently attempts to set a usage that is incompatible with the report identifier, the HidP_SetXXX functions return a status of HIDP_STATUS_INCOMPATIBLE_REPORT_ID.