Поделиться через


HidP_GetButtons (Windows Embedded CE 6.0)

1/6/2010

This macro is a mnemonic alias for the HidP_GetUsages function.

Syntax

#define HidP_GetButtons(Rty, UPa, LCo, ULi, ULe, Ppd, Rep, RLe) \
        HidP_GetUsages(Rty, UPa, LCo, ULi, ULe, Ppd, Rep, RLe)

Parameters

  • UPa
    [in] Usage page of the button usages. The function only returns information about buttons in this usage page.
  • LCo
    [in] Link collection of the button usages. If LinkCollection is nonzero, the function only returns information about the buttons that this link collection contains; otherwise, if LinkCollection is zero, the function returns information about all the buttons in the top-level collection associated with PreparsedData.
  • ULi
    [out] Pointer to a caller-allocated buffer that the function uses to return the usages of all buttons that are set to On and belong to the usage page specified by UsagePage.
  • ULe
    [in, out] On input, the length in array elements of the UsageList buffer. On output, the number of buttons that are set to On in the specified usage page.
  • Ppd
    [in] Pointer to a top-level collection's preparsed data.
  • Rep
    [in] Pointer to a report.
  • RLe
    [in] Length, in bytes, of the report located at Report.

Return Value

The following table shows the possible return values.

Value Description

HIDP_STATUS_SUCCESS

The function has successfully returned all button usages that are set to On.

HIDP_INVALID_REPORT_LENGTH

Report length is not valid.

HIDP_INVALID_REPORT_TYPE

Specified report type is not valid.

HIDP_STATUS_BUFFER_TOO_SMALL

UsageList buffer is too small to hold all the usages that are currently set to On in the specified usage page.

HIDP_STATUS_INCOMPATIBLE_REPORT_ID

Report contains a collection with buttons in the specified usage page, but there are no such usages in the report.

HIDP_STATUS_INVALID_PREPARSED_DATA

Preparsed data is not valid.

HIDP_STATUS_USAGE_NOT_FOUND

Report contains a requested usage that is not in any report supported by the top-level collection.

Remarks

The terms button and usage are used synonymously.

Requirements

Header hidpi.h
Windows Embedded CE Windows CE .NET 4.2 and later

See Also

Reference

HID Parser Macros
HidP_GetUsages
HIDP_REPORT_TYPE