The HidD_SetOutputReport routine sends an output report to a top-level collection.
BOOLEAN HidD_SetOutputReport( HANDLE HidDeviceObject, PVOID ReportBuffer, ULONG ReportBufferLength );
Specifies an open handle to a top-level collection.
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.
Specifies the size, in bytes, of the report buffer. The report buffer must be large enough to hold the output report -- excluding its report ID, if report IDs are used -- plus one additional byte that specifies a nonzero report ID or zero.
If HidD_SetOutputReport succeeds, it returns TRUE; otherwise, it returns FALSE.
Before it calls the HidD_SetOutputReport 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 output report is referenced by the ReportBuffer parameter. Depending on the report ID, the caller prepares the report by calling one of the following functions:
Only user-mode applications can call HidD_SetOutputReport. Kernel-mode drivers can use an IOCTL_HID_SET_OUTPUT_REPORT request.
For more information, see the following topics:
|Windows version||Available in Windows XP and later versions of Windows.|
|Header||hidsdi.h (include Hidsdi.h)|