Share via


HidP_GetData

This function returns, for a specified report, an array of HIDP_DATA structures that identify the data indexes of all HID control buttons that are currently set to ON (one), and the data indexes 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
);

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 Values

The following table shows the possible return values for this function.

Value Description
HIDP_STATUS_SUCCESS All control data was 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

OS Versions: Windows CE .NET 4.2 and later.
Header: Hidpi.h.
Link Library: Hidparse_lib.lib.

See Also

HID Drivers | HIDP_DATA | HidP_MaxDataListLength | HIDP_REPORT_TYPE | HidP_SetData

 Last updated on Tuesday, May 18, 2004

© 1992-2003 Microsoft Corporation. All rights reserved.