The HidP_GetData routine returns, for a specified report, an array of HIDP_DATA structures that identify the data indices of all HID control buttons that are currently set to ON (1), and the data indices and data associated with all HID control values.
NTSTATUS HidP_GetData( HIDP_REPORT_TYPE ReportType, PHIDP_DATA DataList, PULONG DataLength, PHIDP_PREPARSED_DATA PreparsedData, PCHAR Report, ULONG ReportLength );
Specifies a HIDP_REPORT_TYPE enumerator value that indicates the type of HID report located at Report.
Specifies a caller-allocated array of HIDP_DATA structures that the routine uses to return information about all the buttons that are currently set to ON and the data associated with values.
Specifies, on input, the number of structures that the caller-allocated DataList array holds. Specifies, on output, the number of controls for which the routine can return data, which includes all buttons that are currently set to ON and all control values.
Pointer to the preparsed data of the top-level collection associated with the HID report located at Report.
Pointer to a HID report.
Specifies the size, in bytes, of the HID report located at Report, which must be equal to the report length for the specified report type returned by HidP_GetCaps in the collection's HIDP_CAPS structure.
HidP_GetData returns one of the following status values:
||All the control data was successfully returned.|
||The report type specified by ReportType is not valid|
||The preparsed data specified by PreparsedData is not valid|
||The size, in bytes, of the HID report is not equal to the length specified in the collection's HIDP_CAPS structure for the specified report type.|
||The top-level collection does not have a report of the specified type.|
||The DataList array is too small to describe all the buttons, currently set to ON, and all the values in the HID report.|
User-mode applications and kernel-mode drivers call HidP_MaxDataListLength to determine the maximum possible number of HIDP_DATA structures that HidP_GetData can return.
HidP_GetData does not return data for usage value arrays.
For more information, see HID Collections.
|Windows version||Available in Windows 2000 and later versions of Windows.|
|Header||hidpi.h (include Hidpi.h)|