IOCTL_HID_SET_OUTPUT_REPORT control code
The IOCTL_HID_SET_OUTPUT_REPORT request sends an output report to a top-level collection.
For general information about HIDClass devices, see HID Collections.
The Parameters.DeviceIoControl.InputBufferLength member is set to the size, in bytes, of a requester-allocated input buffer that contains a HID class output report.
The input buffer size, in bytes, 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.
The Irp->AssociatedIrp.SystemBuffer member points to the input buffer that contains an output report. If the collection includes report IDs, the requester must set the first byte of the buffer to a nonzero report ID. Otherwise, the requester must set the first byte to zero. The output report -- excluding its report ID, if report IDs are used -- is located at ((PUCHAR)ReportBuffer + 1).
The HID class driver sets the following fields of Irp->IoStatus:
Information is set to zero.
Status is set to STATUS_SUCCESS if the transfer completed without error. Otherwise, it is set to an appropriate NTSTATUS error code.