HidD_SetOutputReport - NtDoc

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

BOOLEAN HidD_SetOutputReport(
  [in] HANDLE HidDeviceObject,
  [in] PVOID  ReportBuffer,
  [in] ULONG  ReportBufferLength
);
View the official Windows Driver Kit DDI reference

NtDoc

No description available.

Windows Driver Kit DDI reference (nf-hidsdi-hidd_setoutputreport)

HidD_SetOutputReport function

Description

The HidD_SetOutputReport routine sends an output report to a top-level collection.

Only use this routine to set the current state of a collection. Some devices might not support this routine and will become unresponsive if this routine is used. For more information, see Sending HID Reports by User-Mode Applications.

Parameters

HidDeviceObject [in]

An open handle to a top-level collection.

ReportBuffer [in]

Pointer to a caller-allocated output report buffer that the caller uses to specify a report ID.

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

ReportBufferLength [in]

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

Return value

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

Remarks

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

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

For an example of how to prepare and a HID report and send it to a top-level collection, see the HClient sample application.

Only user-mode applications can call HidD_SetOutputReport. Kernel-mode drivers can use an IOCTL_HID_SET_OUTPUT_REPORT request.

See also