Share via


HidP_SetButtons

This macro is a mnemonic alias for the HidP_SetUsages function.

#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 could not 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 Values

The following table shows the possible return values for this function.

Value Description
HIDP_STATUS_SUCCESS The function successfully set the usage value.
HIDP_STATUS_BUFFER_TOO_SMALL A usage in a button array could not be set because the array was already fully set.
HIDP_STATUS_INVALID_REPORT_LENGTH Report length was not valid.
HIDP_STATUS_INVALID_REPORT_TYPE Specified report type was not valid.
HIDP_STATUS_INCOMPATIBLE_REPORT_ID Report contained a collection with buttons in the specified usage page, but there were no such usages in the report.
HIDP_STATUS_INVALID_PREPARSED_DATA Preparsed data was not valid.
HIDP_STATUS_USAGE_NOT_FOUND Report contained a requested usage that was not in any report supported by the top-level collection.

Remarks

The terms button and usage are used synonymously.

Requirements

OS Versions: Windows CE .NET 4.2 and later.
Header: Hidpi.h.

See Also

HID Drivers | HIDP_CAPS | HidP_GetButtons | HidP_GetCaps | HidP_GetData | HidP_GetUsages | HIDP_REPORT_TYPE | HidP_SetData | HidP_SetUsages | HidP_UnsetButtons | HidP_UnsetUsages

 Last updated on Tuesday, May 18, 2004

© 1992-2003 Microsoft Corporation. All rights reserved.