Skip to content

Latest commit

 

History

History
122 lines (85 loc) · 4.27 KB

ni-hidclass-ioctl_hid_set_feature.md

File metadata and controls

122 lines (85 loc) · 4.27 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
NI:hidclass.IOCTL_HID_SET_FEATURE
IOCTL_HID_SET_FEATURE (hidclass.h)
The IOCTL_HID_SET_FEATURE request sends a feature report to a top-level collection.
hid\ioctl_hid_set_feature2.htm
hid
04/28/2022
IOCTL_HID_SET_FEATURE IOCTL
IOCTL_HID_SET_FEATURE, IOCTL_HID_SET_FEATURE control, IOCTL_HID_SET_FEATURE control code [Human Input Devices], hid.ioctl_hid_set_feature2, hidclass/IOCTL_HID_SET_FEATURE, hidioreq_def58360-8e73-49dd-ab90-33cf3b6a92de.xml
hidclass.h
Hidclass.h
Windows
Windows
IOCTL_HID_SET_FEATURE
hidclass/IOCTL_HID_SET_FEATURE
APIRef
kbSyntax
HeaderDef
hidclass.h
IOCTL_HID_SET_FEATURE

IOCTL_HID_SET_FEATURE IOCTL

-description

The IOCTL_HID_SET_FEATURE request sends a feature report to a top-level collection.

For general information about HIDClass devices, see HID Collections.

-ioctlparameters

-ioctl-major-code

-input-buffer

The Parameters.DeviceIoControl.InputBufferLength member is set to the size, in bytes, of a requester-allocated input buffer that contains a HID class feature report.

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

The Irp->AssociatedIrp.SystemBuffer member points to the input buffer that contains a feature 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 feature report is located at ((PUCHAR)ReportBuffer + 1).

Minidriver handling

Irp->UserBuffer points to a HID_XFER_PACKET structure that the HID class driver uses to input the following members:

-input-buffer-length

The size of the input buffer in bytes. The 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.

Minidriver handling

The size of a HID_XFER_PACKET structure.

-output-buffer

None.

-output-buffer-length

None.

-in-out-buffer

-inout-buffer-length

-status-block

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

Minidriver handling

HID minidrivers that carry out the I/O to the device set the following fields of Irp->IoStatus:

  • Information is set to the number of bytes transferred to the device.
  • Status is set to STATUS_SUCCESS if the transfer completed without error. Otherwise, it is set to an appropriate NTSTATUS error code.

HID minidrivers that call other drivers with this IOCTL to carry out the I/O, should ensure that the Information field of the status block is correct and not change the contents of the Status field.

-ReportID

Specifies the report ID for a top-level collection.

-reportBuffer

Pointer to a requester-allocated input buffer that contains a feature report.

-reportBufferLen

Specifies the size, in bytes, of the input buffer.

-see-also