USAGE_AND_PAGE structure (hidpi.h)

The USAGE_AND_PAGE structure specifies the usage page and usage ID of a HID control.

Syntax

typedef struct _USAGE_AND_PAGE {
  USAGE Usage;
  USAGE UsagePage;
} USAGE_AND_PAGE, *PUSAGE_AND_PAGE;

Members

Usage

Specifies a usage ID within the usage page specified by UsagePage.

UsagePage

Specifies a usage page.

Remarks

The HidP_IsSameUsageAndPage macro determines if two extended usages, represented by USAGE_AND_PAGE structures, are equal.

BOOLEAN HidP_IsSameUsageAndPage(
   USAGE_AND_PAGE u1,
   USAGE_AND_PAGE u2
);

u1

USAGE_AND_PAGE

Specifies an extended usage

u2

USAGE_AND_PAGE

Specifies an extended usage

Return Value

BOOLEAN

HidP_IsSameUsageAndPage returns one of the following status values:

TRUE

Usage u1 is the same as usage u2.

FALSE

Usage u1 is different than usage u2.

As defined by the USB HID standard, an extended usage is a 32-bit unsigned value. The high-order 16 bits specify the usage page, and lower-order 16 bits specify the usage ID.

For more information, see HID Collections.

Requirements

Requirement Value
Header hidpi.h (include Hidpi.h)

See also

HidP_GetButtonsEx