HidP_GetData - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
// hidpi.h

NTSTATUS HidP_GetData(
  [in]      HIDP_REPORT_TYPE     ReportType,
  [out]     PHIDP_DATA           DataList,
  [in, out] PULONG               DataLength,
  [in]      PHIDP_PREPARSED_DATA PreparsedData,
  [in]      PCHAR                Report,
  [in]      ULONG                ReportLength
);
View the official Windows Driver Kit DDI reference

NtDoc

No description available.

Windows Driver Kit DDI reference (nf-hidpi-hidp_getdata)

HidP_GetData function

Description

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.

Parameters

ReportType [in]

Specifies a HIDP_REPORT_TYPE enumerator value that indicates the type of HID report located at Report.

DataList [out]

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.

DataLength [in, out]

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.

PreparsedData [in]

Pointer to the preparsed data of the top-level collection associated with the HID report located at Report.

Report [in]

Pointer to a HID report.

ReportLength [in]

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.

Return value

HidP_GetData returns one of the following status values:

Return code Description
HIDP_STATUS_SUCCESS All the control data was successfully returned.
HIDP_STATUS_INVALID_REPORT_TYPE The report type specified by ReportType is not valid
HIDP_STATUS_INVALID_PREPARSED_DATA The preparsed data specified by PreparsedData is not valid
HIDP_STATUS_INVALID_REPORT_LENGTH 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.
HIDP_STATUS_REPORT_DOES_NOT_EXIST The top-level collection does not have a report of the specified type.
HIDP_STATUS_BUFFER_TOO_SMALL The DataList array is too small to describe all the buttons, currently set to ON, and all the values in the HID report.

Remarks

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.

See also

HIDP_DATA

HidP_MaxDataListLength

HidP_SetData

_HIDP_PREPARSED_DATA