HidP_GetData (Compact 2013)
3/26/2014
This function returns an array of HIDP_DATA structures for a specified report that identifies the data indexes of all HID control buttons currently set to On (one). It also returns data indexes and data associated with all HID control values.
Syntax
NTSTATUS HidP_GetData(
HIDP_REPORT_TYPE ReportType,
PHIDP_DATA DataList,
PULONG DataLength,
PHIDP_PREPARSED_DATA PreparsedData,
PCHAR Report,
ULONG ReportLength
);
Parameters
- ReportType
[in] HIDP_REPORT_TYPE enumerator value that indicates the type of HID report located in the Report parameter.
- DataList
[out] Caller-allocated array of HIDP_DATA structures that the function uses to return information about all buttons that are currently set to On and the data associated with values.
- DataLength
[in, out] On input, the number of structures that the caller-allocated DataList array holds. On output, the number of controls for which the function can return data, which includes all buttons that are currently set to On and all control values.
- PreparsedData
[in] Pointer to the preparsed data of the top-level collection associated with the HID report located in the Report parameter.
- Report
[in] Pointer to a HID report.
- ReportLength
[in] 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 the HidP_GetCaps function in the collection's HIDP_CAPS structure.
Return Value
The following table shows the possible return values.
Value |
Description |
---|---|
HIDP_STATUS_SUCCESS |
All control data has been successfully returned. |
HIDP_STATUS_INVALID_REPORT_TYPE |
Report type specified by ReportType is not valid. |
HIDP_STATUS_INVALID_PREPARSED_DATA |
Preparsed data specified by PreparsedData is not valid. |
HIDP_STATUS_INVALID_REPORT_LENGTH |
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. |
HIDP_STATUS_REPORT_DOES_NOT_EXIST |
Top-level collection does not have a report of the specified type. |
HIDP_STATUS_BUFFER_TOO_SMALL |
Datalist array is too small to describe all the buttons that are currently set to On and all the values in the HID report. |
Remarks
HID clients call the HidP_MaxDataListLength function 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.
Requirements
Header |
hidpi.h |
Library |
Hidparse_lib.lib |
See Also
Reference
HID Parser Functions
HIDP_DATA
HidP_MaxDataListLength
HIDP_REPORT_TYPE
HidP_SetData