// hidpi.h
NTSTATUS HidP_GetButtonCaps(
[in] HIDP_REPORT_TYPE ReportType,
[out] PHIDP_BUTTON_CAPS ButtonCaps,
[in, out] PUSHORT ButtonCapsLength,
[in] PHIDP_PREPARSED_DATA PreparsedData
);
View the official Windows Driver Kit DDI referenceNo description available.
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.
ReportType [in]Specifies a HIDP_REPORT_TYPE enumerator value that identifies the report type.
ButtonCaps [out]Pointer to a caller-allocated buffer that the routine uses to return a button capability array for the specified report type.
ButtonCapsLength [in, out]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 [in]Pointer to a top-level collection's preparsed data.
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. |
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.