Skip to content

Latest commit

 

History

History
110 lines (85 loc) · 5.15 KB

nf-hidsdi-hidd_getinputreport.md

File metadata and controls

110 lines (85 loc) · 5.15 KB
UID title description old-location tech.root ms.date keywords ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames f1_keywords topic_type api_type api_location api_name
NF:hidsdi.HidD_GetInputReport
HidD_GetInputReport function (hidsdi.h)
The HidD_GetInputReport routine returns an input reports from a top-level collection.
hid\hidd_getinputreport.htm
hid
05/03/2022
HidD_GetInputReport function
HidD_GetInputReport, HidD_GetInputReport routine [Human Input Devices], hid.hidd_getinputreport, hidfunc_fdcd7a5b-6623-419f-abdf-de19370ee793.xml, hidsdi/HidD_GetInputReport
hidsdi.h
Hidsdi.h
Universal
Available in Windows XP and later versions of Windows.
Hid.lib
Hid.dll
Windows
HidD_GetInputReport
hidsdi/HidD_GetInputReport
APIRef
kbSyntax
DllExport
Hid.dll
HidD_GetInputReport

HidD_GetInputReport function

-description

The HidD_GetInputReport routine returns an input report from a top-level collection.

Only use this routine to obtain the current state of a collection. If an application attempts to use this routine to continuously obtain input reports, the reports can be lost. For more information, see Obtaining HID Reports by user-mode applications.

-parameters

-param HidDeviceObject [in]

An open handle to a top-level collection.

-param ReportBuffer [out]

Pointer to a caller-allocated input report buffer that the caller uses to specify a HID report ID and HidD_GetInputReport uses to return the specified input report.

For more information about this parameter, see the Remarks section.

-param ReportBufferLength [in]

The size of the report buffer in bytes. The report buffer must be large enough to hold the input report plus one additional byte that specifies a report ID. If report ID is not used, the ID value is zero.

-returns

HidD_GetInputReport returns TRUE if it succeeds; otherwise, it returns FALSE. Use GetLastError to get extended error information.

-remarks

The correct ReportBufferLength is specified by the InputReportByteLength member of a top-level collection's HIDP_CAPS structure returned from HidP_GetCaps call.

Before it calls the HidD_GetInputReport routine, the caller must do the following:

  • If the top-level collection includes report IDs, the caller must set the first byte of the ReportBuffer parameter to a nonzero report ID.
  • If the top-level collection does not include report IDs, the caller must set the first byte of the ReportBuffer parameter to zero.

The input report is returned in the ReportBuffer parameter. Depending on the report ID, the caller parses the report by calling one of the following functions:

For an example of how to parse a HID report, see the HClient sample application.

Only user-mode applications can call HidD_GetInputReport. Kernel-mode drivers can use an IOCTL_HID_GET_INPUT_REPORTrequest.

For more information, see Interpreting HID Reports.

-see-also