// ntddscsi.h
typedef struct _SCSI_PASS_THROUGH_DIRECT {
USHORT Length;
UCHAR ScsiStatus;
UCHAR PathId;
UCHAR TargetId;
UCHAR Lun;
UCHAR CdbLength;
UCHAR SenseInfoLength;
UCHAR DataIn;
ULONG DataTransferLength;
ULONG TimeOutValue;
PVOID DataBuffer;
ULONG SenseInfoOffset;
UCHAR Cdb[16];
} SCSI_PASS_THROUGH_DIRECT, *PSCSI_PASS_THROUGH_DIRECT;
View the official Windows Driver Kit DDI referenceNo description available.
The SCSI_PASS_THROUGH_DIRECT structure is used in conjunction with an IOCTL_SCSI_PASS_THROUGH_DIRECT request to instruct the port driver to send an embedded SCSI command to the target device.
[!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.
LengthContains the value of sizeof(SCSI_PASS_THROUGH_DIRECT).
ScsiStatusReports the SCSI status that was returned by the HBA or the target device.
PathIdIndicates the SCSI port or bus for the request.
TargetIdIndicates the target controller or device on the bus.
LunIndicates the logical unit number of the device.
CdbLengthIndicates the size in bytes of the SCSI command descriptor block.
SenseInfoLengthIndicates the size in bytes of the request-sense buffer.
DataInIndicates whether the SCSI command will read or write data. This field must have one of three values:
| Data Transfer Type | Meaning |
|---|---|
| SCSI_IOCTL_DATA_IN | Read data from the device. |
| SCSI_IOCTL_DATA_OUT | Write data to the device. |
| SCSI_IOCTL_DATA_UNSPECIFIED | No data transferred. |
DataTransferLengthIndicates the size in bytes of the data buffer. Many devices transfer chunks of data of predefined length. The value in DataTransferLength must be an integral multiple of this predefined, minimum length that is specified by the device. If an underrun occurs, the miniport driver must update this member to the number of bytes actually transferred.
TimeOutValueIndicates the interval in seconds that the request can execute before the OS-specific port driver might consider it timed out.
DataBufferPointer to the data buffer.
SenseInfoOffsetContains an offset from the beginning of this structure to the request-sense buffer.
CdbSpecifies the SCSI command descriptor block to be sent to the target device.
The SCSI_PASS_THROUGH_DIRECT structure is used with IOCTL_SCSI_PASS_THROUGH_DIRECT. With this request, the system locks down the buffer in user memory and the device accesses this memory directly. For a double-buffered equivalent of this device control request see IOCTL_SCSI_PASS_THROUGH and SCSI_PASS_THROUGH.
The members of SCSI_PASS_THROUGH_DIRECT correspond roughly to the members of a SCSI_REQUEST_BLOCK structure. The values of the DataIn member correspond to the SCSI_IOCTL_DATA_IN, SCSI_IOCTL_DATA_OUT, and SCSI_IOCTL_DATA_UNSPECIFIED flags assigned to SrbFlags member of SCSI_REQUEST_BLOCK.
IOCTL_SCSI_PASS_THROUGH_DIRECT