HidP_UnsetUsages
This function sets specified HID control button usages OFF (zero) in a HID report.
NTSTATUS HidP_UnsetUsages(
HIDP_REPORT_TYPE ReportType,
USAGE UsagePage,
USHORT LinkCollection,
PUSAGE UsageList,
PULONG UsageLength,
PHIDP_PREPARSED_DATA PreparsedData,
PCHAR Report,
ULONG ReportLength
);
Parameters
ReportType
[in] HIDP_REPORT_TYPE enumerator value that indicates the type of report located at Report.UsagePage
[in] Usage page of the usages specified by UsageList.LinkCollection
[in] Optional. 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 usage it finds in the top-level collection associated with PreparsedData.UsageList
[in] Pointer to the array of usages to set to OFF.UsageLength
[in, out] On input, the number of usages in UsageList. On output, the following table shows the possible values.Value Description Input value is unchanged. ReportType, PreparsedData, Report, or ReportLength is not valid. Input value is unchanged. All usages are successfully set to OFF. Index of the usage in UsageList that caused the error. A usage could not be set to OFF. PreparsedData
[in] Pointer to the preparsed data of the top-level collection associated with the report located at Report.Report
[in, out] On input, an initialized HID report. On output, a pointer to a HID report.ReportLength
[in] Size, in bytes, of the report located at Report, 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 | Successfully set all the usages in UsageList to OFF. |
HIDP_STATUS_INVALID_PREPARSED_DATA | Preparsed data specified by PreparsedData was not valid. |
HIDP_STATUS_INVALID_REPORT_LENGTH | Report length was not valid. |
HIDP_STATUS_INVALID_REPORT_TYPE | Report type was not valid. |
HIDP_STATUS_REPORT_DOES_NOT_EXIST | Collection did not contain a report of the specified type. |
HIDP_STATUS_BUTTON_NOT_PRESSED | Usage was already set to OFF. |
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_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.
Link Library: Hidparse_lib.lib.
See Also
HID Drivers | HIDP_CAPS | HidP_GetCaps | HIDP_REPORT_TYPE | HidP_SetButtons | HidP_SetData | HidP_SetUsages | HidP_UnsetButtons
Last updated on Tuesday, May 18, 2004
© 1992-2003 Microsoft Corporation. All rights reserved.