Export (0) Print
Expand All

HidP_InitializeReportForID routine

The HidP_InitializeReportForID routine initializes a HID report.

Syntax


NTSTATUS __stdcall HidP_InitializeReportForID(
  _In_   HIDP_REPORT_TYPE ReportType,
  _In_   UCHAR ReportID,
  _In_   PHIDP_PREPARSED_DATA PreparsedData,
  _Out_  PCHAR Report,
  _In_   ULONG ReportLength
);

Parameters

ReportType [in]

Specifies a HIDP_REPORT_TYPE enumerator that indicates the type of HID report located at Report.

ReportID [in]

Specifies a report ID.

PreparsedData [in]

Pointer to the preparsed data of the top-level collection associated with the HID report located at Report.

Report [out]

Pointer to the caller-allocated buffer containing the HID report that HidP_InitializeReportForID initializes.

ReportLength [in]

Specifies the 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

HidP_InitializeReportForID returns one of the following status values:

Return codeDescription
HIDP_STATUS_SUCCESS

The report was successfully initialized.

HIDP_STATUS_INVALID_PREPARSED_DATA

The preparsed data is not valid.

HIDP_STATUS_INVALID_REPORT_LENGTH

The specified length of the report is not equal to the collection's report length for the specified report type.

HIDP_STATUS_INVALID_REPORT_TYPE

The report type is not valid.

HIDP_STATUS_REPORT_DOES_NOT_EXIST

The specified report ID 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 the current value of a control should not be modified.)

HidP_InitializeReportForID does the following:

  • Sets to zero the bitfields of all buttons and values without null values.

  • Sets the bitfield of all controls with null values to their corresponding null value.

For more information, see HID Collections.

Requirements

Version

Available in Windows 2000 and later versions of Windows.

Header

Hidpi.h (include Hidpi.h)

Library

Hidparse.lib

IRQL

<= DISPATCH_LEVEL

See also

_HIDP_PREPARSED_DATA
HIDP_CAPS
HidP_GetCaps
HIDP_REPORT_TYPE

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft