Bewerken

Delen via


HidP_GetButtonCaps function (hidpi.h)

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(
  [in]      HIDP_REPORT_TYPE     ReportType,
  [out]     PHIDP_BUTTON_CAPS    ButtonCaps,
  [in, out] PUSHORT              ButtonCapsLength,
  [in]      PHIDP_PREPARSED_DATA PreparsedData
);

Parameters

[in] ReportType

Specifies a HIDP_REPORT_TYPE enumerator value that identifies the report type.

[out] ButtonCaps

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

[in, out] 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.

[in] 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

Requirement Value
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