// hidpi.h
typedef struct _HIDP_VALUE_CAPS {
USAGE UsagePage;
UCHAR ReportID;
BOOLEAN IsAlias;
USHORT BitField;
USHORT LinkCollection;
USAGE LinkUsage;
USAGE LinkUsagePage;
BOOLEAN IsRange;
BOOLEAN IsStringRange;
BOOLEAN IsDesignatorRange;
BOOLEAN IsAbsolute;
BOOLEAN HasNull;
UCHAR Reserved;
USHORT BitSize;
USHORT ReportCount;
USHORT Reserved2[5];
ULONG UnitsExp;
ULONG Units;
LONG LogicalMin;
LONG LogicalMax;
LONG PhysicalMin;
LONG PhysicalMax;
union {
struct {
USAGE UsageMin;
USAGE UsageMax;
USHORT StringMin;
USHORT StringMax;
USHORT DesignatorMin;
USHORT DesignatorMax;
USHORT DataIndexMin;
USHORT DataIndexMax;
} Range;
struct {
USAGE Usage;
USAGE Reserved1;
USHORT StringIndex;
USHORT Reserved2;
USHORT DesignatorIndex;
USHORT Reserved3;
USHORT DataIndex;
USHORT Reserved4;
} NotRange;
};
} HIDP_VALUE_CAPS, *PHIDP_VALUE_CAPS;
View the official Windows Driver Kit DDI referenceNo description available.
The HIDP_VALUE_CAPS structure contains information that describes the capability of a set of HID control values (either a single usage or a usage range).
UsagePageSpecifies the usage page of the usage or usage range.
ReportIDSpecifies the report ID of the HID report that contains the usage or usage range.
IsAliasIndicates, if TRUE, that the usage is member of a set of aliased usages. Otherwise, if IsAlias is FALSE, the value has only one usage.
BitFieldContains the data fields (one or two bytes) associated with an input, output, or feature main item.
LinkCollectionSpecifies the index of the link collection in a top-level collection's link collection array that contains the usage or usage range. If LinkCollection is zero, the usage or usage range is contained in the top-level collection.
LinkUsageSpecifies the usage of the link collection that contains the usage or usage range. If LinkCollection is zero, LinkUsage specifies the usage of the top-level collection.
LinkUsagePageSpecifies the usage page of the link collection that contains the usage or usage range. If LinkCollection is zero, LinkUsagePage specifies the usage page of the top-level collection.
IsRangeSpecifies, if TRUE, that the structure describes a usage range. Otherwise, if IsRange is FALSE, the structure describes a single usage.
IsStringRangeSpecifies, if TRUE, that the usage or usage range has a set of string descriptors. Otherwise, if IsStringRange is FALSE, the usage or usage range has zero or one string descriptor.
IsDesignatorRangeSpecifies, if TRUE, that the usage or usage range has a set of designators. Otherwise, if IsDesignatorRange is FALSE, the usage or usage range has zero or one designator.
IsAbsoluteSpecifies, if TRUE, that the usage or usage range provides absolute data. Otherwise, if IsAbsolute is FALSE, the value is the change in state from the previous value.
HasNullSpecifies, if TRUE, that the usage supports a NULL value, which indicates that the data is not valid and should be ignored. Otherwise, if HasNull is FALSE, the usage does not have a NULL value.
ReservedReserved for internal system use.
BitSizeSpecifies the size, in bits, of a usage's data field in a report. If ReportCount is greater than one, each usage has a separate data field of this size.
ReportCountSpecifies the number of usages that this structure describes.
Reserved2Reserved for internal system use.
UnitsExpSpecifies the usage's exponent, as described by the USB HID standard.
UnitsSpecifies the usage's units, as described by the USB HID Standard.
LogicalMinSpecifies a usage's signed lower bound.
LogicalMaxSpecifies a usage's signed upper bound.
PhysicalMinSpecifies a usage's signed lower bound after scaling is applied to the logical minimum value.
PhysicalMaxSpecifies a usage's signed upper bound after scaling is applied to the logical maximum value.
RangeSpecifies, if IsRange is TRUE, information about a usage range. Otherwise, if IsRange is FALSE, NotRange contains information about a single usage.
Range.UsageMinIndicates the inclusive lower bound of usage range whose inclusive upper bound is specified by Range.UsageMax.
Range.UsageMaxIndicates the inclusive upper bound of a usage range whose inclusive lower bound is indicated by Range.UsageMin.
Range.StringMinIndicates the inclusive lower bound of a range of string descriptors (specified by string minimum and string maximum items) whose inclusive upper bound is indicated by Range.StringMax.
Range.StringMaxIndicates the inclusive upper bound of a range of string descriptors (specified by string minimum and string maximum items) whose inclusive lower bound is indicated by Range.StringMin.
Range.DesignatorMinIndicates the inclusive lower bound of a range of designators (specified by designator minimum and designator maximum items) whose inclusive lower bound is indicated by Range.DesignatorMax.
Range.DesignatorMaxIndicates the inclusive upper bound of a range of designators (specified by designator minimum and designator maximum items) whose inclusive lower bound is indicated by Range.DesignatorMin.
Range.DataIndexMinIndicates the inclusive lower bound of a sequential range of data indices that correspond, one-to-one and in the same order, to the usages specified by the usage range Range.UsageMin to Range.UsageMax.
Range.DataIndexMaxIndicates the inclusive upper bound of a sequential range of data indices that correspond, one-to-one and in the same order, to the usages specified by the usage range Range.UsageMin to Range.UsageMax.
NotRangeSpecifies, if IsRange is FALSE, information about a single usage. Otherwise, if IsRange is TRUE, Range contains information about a usage range.
NotRange.Reserved1Reserved for internal system use.
NotRange.UsageIndicates a usage ID.
NotRange.StringIndexIndicates a string descriptor ID for the usage specified by NotRange.Usage.
NotRange.Reserved2Reserved for internal system use.
NotRange.DesignatorIndexIndicates a designator ID for the usage specified by NotRange.Usage.
NotRange.Reserved3Reserved for internal system use.
NotRange.DataIndexIndicates the data index of the usage specified by NotRange.Usage.
NotRange.Reserved4Reserved for internal system use.
Clients obtain a value capability array by calling HidP_GetValueCaps or HidP_GetSpecificValueCaps. These routines return an array of HIDP_VALUE_CAPS structures in a caller-allocated buffer. The required buffer length is specified in the HIDP_CAPS structure returned by HidP_GetCaps.
For information about the capabilities of HID control values, see Collection Capability and Value Capability Arrays.