HidP_InitializeReportForID
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 for this function.
| Value | Description |
|---|---|
| HIDP_STATUS_SUCCESS | Report was successfully initialized. |
| HIDP_STATUS_INVALID_PREPARSED_DATA | Preparsed data was not valid. |
| HIDP_STATUS_INVALID_REPORT_LENGTH | Specified length of the report was not equal to the collection's report length for the specified report type. |
| HIDP_STATUS_INVALID_REPORT_TYPE | Report type was not valid. |
| HIDP_STATUS_REPORT_DOES_NOT_EXIST | Specified report identifier was 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
HID Drivers | HIDP_CAPS | HIDP_REPORT_TYPE
Last updated on Tuesday, May 18, 2004
© 1992-2003 Microsoft Corporation. All rights reserved.