HidP_InitializeReportForID - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
// hidpi.h

NTSTATUS HidP_InitializeReportForID(
  [in]  HIDP_REPORT_TYPE     ReportType,
  [in]  UCHAR                ReportID,
  [in]  PHIDP_PREPARSED_DATA PreparsedData,
  [out] PCHAR                Report,
  [in]  ULONG                ReportLength
);
View the official Windows Driver Kit DDI reference

NtDoc

No description available.

Windows Driver Kit DDI reference (nf-hidpi-hidp_initializereportforid)

HidP_InitializeReportForID function

Description

The HidP_InitializeReportForID routine initializes a HID report.

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 code Description
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:

For more information, see HID Collections.

See also

HIDP_CAPS

HIDP_REPORT_TYPE

HidP_GetCaps

_HIDP_PREPARSED_DATA