HidP_GetButtonCaps function

The HidP_GetButtonCaps routine returns a button capability array that describes all 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

Specifies a HIDP_REPORT_TYPE enumerator value that identifies the report type.

ButtonCaps

Pointer to a caller-allocated buffer that the routine uses to return a button capability array for the specified report type.

ButtonCapsLength

Specifies the length on input, in array elements, of the buffer provided at ButtonCaps. On output, this parameter is set to the actual number of elements that the routine returns.

PreparsedData

Pointer to a top-level collection's preparsed data.

Return Value

HidP_GetButtonCaps returns one of the following status values:

Return code Description
HIDP_STATUS_SUCCESS
The routine successfully returned the capability data.
HIDP_STATUS_INVALID_PREPARSED_DATA
The preparsed data is not valid.

Remarks

HidP_GetButtonCaps returns the capability of all buttons in a top level collection for a specified report type.

ButtonCapsLength should be set to the value of the NumberXxxButtonCaps member of the HIDP_CAPS structure returned by HidP_GetCaps, where Xxx specifies the report type.

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

For more information about a collection's capability, see Obtaining Collection Information.

See also HID Collections.

Requirements

   
Minimum supported client Available in Windows 2000 and later versions of Windows.
Target Platform Universal
Header hidpi.h (include Hidpi.h)
Library Hidparse.lib
IRQL PASSIVE_LEVEL

See Also

HIDP_BUTTON_CAPS

HidP_GetCaps

HidP_GetSpecificButtonCaps

_HIDP_PREPARSED_DATA