Freigeben über


HidP_GetExtendedAttributes (Windows CE 5.0)

Send Feedback

This function returns the extended attributes of a HID control.

NTSTATUS HidP_GetExtendedAttributes(  HIDP_REPORT_TYPE ReportType,  USHORT DataIndex,  PHIDP_PREPARSED_DATA PreparsedData,  PHIDP_EXTENDED_ATTRIBUTES Attributes,  PULONG LengthAttributes);

Parameters

  • ReportType
    [in] HIDP_REPORT_TYPE enumerator value that indicates the type of HID report associated with the HID control specified by DataIndex.
  • DataIndex
    [in] Data index of the HID control.
  • PreparsedData
    [in] Preparsed data for the top-level collection that contains the specified control.
  • Attributes
    [out] Pointer to a caller-allocated buffer that the function uses to return the extended attributes of the control specified by DataIndex.
  • LengthAttributes
    [in, out] On input, the size in bytes of the Attributes buffer, which must be greater than or equal to sizeof(HIDP_EXTENDED_ATTRIBUTES). On output, the size in bytes of the Attributes buffer.

Return Values

The following table shows the possible return values.

Value Description
HIDP_STATUS_SUCCESS Function successfully returned the control's extended attribute information.
HIDP_STATUS_BUFFER_TOO_SMALL Attribute buffer is not large enough to hold all extended attribute information.
HIDP_STATUS_DATA_INDEX_NOT_FOUND Specified data index is not valid.

Remarks

HidP_GetExtendedAttributes returns a variable length HIDP_EXTENDED_ATTRIBUTES structure in the Attribute buffer. The HIDP_EXTENDED_ATTRIBUTES extended attributes structure contains, in consecutive order, the fixed length members NumGlobalUnknowns, Reserved, and GlobalUnknowns, followed by a variable length array of HIDP_UNKNOWN_TOKEN structures. The first member of the unknown token array is located at (PHID_UNKNOWN_TOKEN*)&(Attributes->Data).

The function returns as many bytes of the extended attribute information as the Attribute buffer can hold. If the buffer is too small, the function truncates the information it returns. To determine the number of unknown tokens in the variable length array, a caller can first use the Attributes buffer to return the value of the NumGlobalUnknowns member of the extended attributes information.

Requirements

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

See Also

HIDP_EXTENDED_ATTRIBUTES | HIDP_REPORT_TYPE | HIDP_UNKNOWN_TOKEN

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.