Share via


HidP_UnsetUsages (Windows CE 5.0)

Send Feedback

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.

    The following table shows the possible values on output.

    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 cannot 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.

Value Description
HIDP_STATUS_SUCCESS All usages in UsageList are successfully set to Off.
HIDP_STATUS_INVALID_PREPARSED_DATA Preparsed data specified by PreparsedData is not valid.
HIDP_STATUS_INVALID_REPORT_LENGTH Report length is not valid.
HIDP_STATUS_INVALID_REPORT_TYPE Report type is not valid.
HIDP_STATUS_REPORT_DOES_NOT_EXIST Collection does not contain a report of the specified type.
HIDP_STATUS_BUTTON_NOT_PRESSED Usage is already set to Off.
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_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

OS Versions: Windows CE .NET 4.2 and later.
Header: Hidpi.h.
Link Library: Hidparse_lib.lib.

See Also

HIDP_CAPS | HidP_GetCaps | HIDP_REPORT_TYPE | HidP_SetButtons | HidP_SetData | HidP_SetUsages | HidP_UnsetButtons

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.