Share via


HidP_InitializeReportForID (Windows CE 5.0)

Send Feedback

This function initializes a HID report.

NTSTATUSHidP_InitializeReportForID(  HIDP_REPORT_TYPE ReportType,  UCHAR ReportID,  PHIDP_PREPARSED_DATA PreparsedData,  PCHAR Report,  ULONG ReportLength);

Parameters

  • ReportType
    [in] HIDP_REPORT_TYPE enumerator that indicates the type of HID report located at Report.
  • ReportID
    [in] Report identifier.
  • PreparsedData
    [in] Pointer to the preparsed data of the top-level collection associated with the HID report located at Report.
  • Report
    [in, out] On input, initializes the parameter. On output, pointer to the caller-allocated buffer containing the HID report that HidP_InitializeReportForID initializes.
  • ReportLength
    [in] Size, in bytes, of the HID report located at Report. ReportLength must be equal to the collection's report length for the specified report type, as specified by the XXXReportByteLength members of a collection's HIDP_CAPS structure.

Return Values

The following table shows the possible return values.

Value Description
HIDP_STATUS_SUCCESS Report is successfully initialized.
HIDP_STATUS_INVALID_PREPARSED_DATA Preparsed data is not valid.
HIDP_STATUS_INVALID_REPORT_LENGTH Specified length of the report is not equal to the collection's report length for the specified report type.
HIDP_STATUS_INVALID_REPORT_TYPE Report type is not valid.
HIDP_STATUS_REPORT_DOES_NOT_EXIST Specified report identifier is not valid.

Remarks

Initializing a HID report sets all control data to zero or a control's NULL value, as defined by the USB HID standard. Sending or receiving a NULL value indicates that nothing should modify the current value of a control.

HidP_InitializeReportForID sets the bit fields of all buttons and values without NULL values to zero and sets the bit fields of all controls with NULL values to their corresponding NULL value.

Requirements

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

See Also

HIDP_CAPS | HIDP_REPORT_TYPE

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.