// ntddscsi.h
// CTL_CODE(0x0004, 0x402, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
#define IOCTL_SCSI_MINIPORT 0x0004D008
View the official Windows Driver Kit DDI referenceNo description available.
Sends a special control function to a host bus adapter-specific (HBA) miniport driver. Results vary, depending on the particular miniport driver to which this request is forwarded. If the caller specifies a nonzero Length, either the input or output buffer must be at least (sizeof(SRB_IO_CONTROL) + DataBufferLength)).
The prescribed way to open the HBA is use the SetupDiXxx APIs to get all the ScsiAdapter class devices that are running. Get the properties of each for their device instance name and open the HBA directly. SCSI%d (for example, \\.\Scsi0:) is a symbolic link and not ALL storage drivers create the link.
[!NOTE] The SCSI port driver and SCSI miniport driver models may be altered or unavailable in the future. Instead, we recommend using the Storport driver and Storport miniport driver models.
The buffer at Irp->AssociatedIrp.SystemBuffer must contain an SRB_IO_CONTROL structure.
Parameters.DeviceIoControl.InputBufferLength indicates the size, in bytes, of the buffer, which must be at least sizeof(SRB_IO_CONTROL), with additional storage for data if the Length field is nonzero.
An updated SRB_IO_CONTROL structure is returned to the buffer at Irp->AssociatedIrp.SystemBuffer.
The length of the SRB_IO_CONTROL structure.
None.
Not applicable.
The Information field contains the number of bytes returned in the output buffer. The Status field indicates the results of the operation.