Share via


HidP_InitializeReportForID (Windows Embedded CE 6.0)

1/6/2010

This function initializes a HID report.

Syntax

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 Value

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

Header hidpi.h
Library Hidparse_lib.lib
Windows Embedded CE Windows CE .NET 4.2 and later

See Also

Reference

HID Parser Functions
HIDP_CAPS
HIDP_REPORT_TYPE