次の方法で共有


HidP_GetButtonCaps (Compact 2013)

3/26/2014

This function returns a button capability array that describes the HID control buttons in a top-level collection for a specified type of HID report.

Syntax

NTSTATUS HidP_GetButtonCaps(
  HIDP_REPORT_TYPE ReportType,
  PHIDP_BUTTON_CAPS ButtonCaps,
  PUSHORT ButtonCapsLength,
  PHIDP_PREPARSED_DATA PreparsedData
);

Parameters

  • ReportType
    [in] HIDP_REPORT_TYPE enumerator value to identify the report type.
  • ButtonCaps
    [out] Pointer to a caller-allocated buffer that the function uses to return a button capability array for the specified ReportType.
  • ButtonCapsLength
    [in, out] On input, specifies the length in array elements of the buffer provided in ButtonCaps. On output, the actual number of elements that the function returns.
  • PreparsedData
    [in] Pointer to a top-level collection's preparsed data.

Return Value

Returns HIDP_STATUS_SUCCESS if the function successfully returned the capability data. Returns HIDP_STATUS_INVALID_PREPARSED_DATA if the preparsed data is not valid.

Remarks

The terms button and usage are used synonymously.

HidP_GetButtonCaps returns the capability of all buttons in a top-level collection for a specified ReportType.

Set ButtonCapsLength to the value of the NumberXXXButtonCaps member of the HIDP_CAPS structure returned by the HidP_GetCaps function, XXX specifies the report type.

To obtain a subset of button capabilities, selected by usage, usage page, or link collection, use the HidP_GetSpecificButtonCaps function.

Requirements

Header

hidpi.h

Library

Hidparse_lib.lib

See Also

Reference

HID Parser Functions
HIDP_CAPS
HidP_GetCaps
HIDP_REPORT_TYPE
HidP_GetSpecificButtonCaps