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


HidP_SetButtons (Windows Embedded CE 6.0)

1/6/2010

This macro is a mnemonic alias for the HidP_SetUsages function.

Syntax

#define HidP_SetButtons(Rty, Up, Lco, ULi, ULe, Ppd, Rep, Rle) \
        HidP_SetUsages(Rty, Up, Lco, ULi, ULe, Ppd, Rep, Rle)

Parameters

  • Rty
    [in] HIDP_REPORT_TYPE enumerator value that indicates the type of report located at Rep.
  • Up
    [in] Usage page for the usages specified by UsageList.
  • Lco
    [in] Link collection that contains the usages. If LinkCollection is nonzero, the function only sets the usages, if they exist, in this link collection. If LinkCollection is zero, the function sets the first usage for each specified usage in the top-level collection associated with PreparsedData.
  • ULi
    [in] Pointer to the array of usages.
  • ULe
    [in, out] On input, the number of usages in UsageList. On output, if HidP_SetUsages cannot set a usage in UsageList, the function sets UsageLength to the index of the usage that cannot be set, and returns a status value that indicates the error.
  • Ppd
    [in] Pointer to the preparsed data of the top-level collection associated with the report located at Report.
  • Rep
    [in, out] On input, an initialized report. On output, a pointer to a report.
  • Rle
    [in] Size, in bytes, of the report located at Rep, which must be equal to the report length for the specified report type that HidP_GetCaps returns in a collection's HIDP_CAPS structure.

Return Value

The following table shows the possible return values.

Value Description

HIDP_STATUS_SUCCESS

The function has successfully set the usage value.

HIDP_STATUS_BUFFER_TOO_SMALL

A usage in a button array cannot be set because the array is already fully set.

HIDP_STATUS_INVALID_REPORT_LENGTH

Report length is not valid.

HIDP_STATUS_INVALID_REPORT_TYPE

Specified report type is not valid.

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_CAPS
HidP_GetButtons
HidP_GetCaps
HidP_GetData
HidP_GetUsages
HIDP_REPORT_TYPE
HidP_SetData
HidP_SetUsages
HidP_UnsetButtons
HidP_UnsetUsages