The HidP_InitializeReportForID routine initializes a HID report.
NTSTATUS __stdcall HidP_InitializeReportForID( _In_ HIDP_REPORT_TYPE ReportType, _In_ UCHAR ReportID, _In_ PHIDP_PREPARSED_DATA PreparsedData, _Out_ PCHAR Report, _In_ ULONG ReportLength );
Specifies a HIDP_REPORT_TYPE enumerator that indicates the type of HID report located at Report.
Specifies a report ID.
Pointer to the caller-allocated buffer containing the HID report that HidP_InitializeReportForID initializes.
Specifies the size, in bytes, of the HID report located at Report. ReportLength must be equal to the collection's report length for the specified report type, as specified by the XxxReportByteLength members of a collection's HIDP_CAPS structure.
HidP_InitializeReportForID returns one of the following status values:
||The report was successfully initialized.|
||The preparsed data is not valid.|
||The specified length of the report is not equal to the collection's report length for the specified report type.|
||The report type is not valid.|
||The specified report ID is not valid.|
Initializing a HID report sets all control data to zero or a control's null value, as defined by the USB HID standard. (Sending or receiving a null value indicates that the current value of a control should not be modified.)
HidP_InitializeReportForID does the following:
Sets to zero the bitfields of all buttons and values without null values.
Sets the bitfield of all controls with null values to their corresponding null value.
|Windows version||Available in Windows 2000 and later versions of Windows.|
|Header||hidpi.h (include Hidpi.h)|