12DEFINE_GUID(ScsiRawInterfaceGuid,0x53f56309L,0xb6bf,0x11d0,0x94,0xf2,0x00,0xa0,0xc9,0x1e,0xfb,0x8b);
13DEFINE_GUID(WmiScsiAddressGuid,0x53f5630fL,0xb6bf,0x11d0,0x94,0xf2,0x00,0xa0,0xc9,0x1e,0xfb,0x8b);
23#define IOCTL_SCSI_BASE FILE_DEVICE_CONTROLLER
25#define DD_SCSI_DEVICE_NAME "\\Device\\ScsiPort"
26#define DD_SCSI_DEVICE_NAME_U L"\\Device\\ScsiPort"
28#define IOCTL_SCSI_PASS_THROUGH CTL_CODE(IOCTL_SCSI_BASE,0x0401,METHOD_BUFFERED,FILE_READ_ACCESS | FILE_WRITE_ACCESS)
29#define IOCTL_SCSI_MINIPORT CTL_CODE(IOCTL_SCSI_BASE,0x0402,METHOD_BUFFERED,FILE_READ_ACCESS | FILE_WRITE_ACCESS)
30#define IOCTL_SCSI_GET_INQUIRY_DATA CTL_CODE(IOCTL_SCSI_BASE,0x0403,METHOD_BUFFERED,FILE_ANY_ACCESS)
31#define IOCTL_SCSI_GET_CAPABILITIES CTL_CODE(IOCTL_SCSI_BASE,0x0404,METHOD_BUFFERED,FILE_ANY_ACCESS)
32#define IOCTL_SCSI_PASS_THROUGH_DIRECT CTL_CODE(IOCTL_SCSI_BASE,0x0405,METHOD_BUFFERED,FILE_READ_ACCESS | FILE_WRITE_ACCESS)
33#define IOCTL_SCSI_GET_ADDRESS CTL_CODE(IOCTL_SCSI_BASE,0x0406,METHOD_BUFFERED,FILE_ANY_ACCESS)
34#define IOCTL_SCSI_RESCAN_BUS CTL_CODE(IOCTL_SCSI_BASE,0x0407,METHOD_BUFFERED,FILE_ANY_ACCESS)
35#define IOCTL_SCSI_GET_DUMP_POINTERS CTL_CODE(IOCTL_SCSI_BASE,0x0408,METHOD_BUFFERED,FILE_ANY_ACCESS)
36#define IOCTL_SCSI_FREE_DUMP_POINTERS CTL_CODE(IOCTL_SCSI_BASE,0x0409,METHOD_BUFFERED,FILE_ANY_ACCESS)
37#define IOCTL_SCSI_PASS_THROUGH_EX CTL_CODE(IOCTL_SCSI_BASE, 0x0411, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
38#define IOCTL_SCSI_PASS_THROUGH_DIRECT_EX CTL_CODE(IOCTL_SCSI_BASE, 0x0412, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
39#define IOCTL_IDE_PASS_THROUGH CTL_CODE(IOCTL_SCSI_BASE,0x040a,METHOD_BUFFERED,FILE_READ_ACCESS | FILE_WRITE_ACCESS)
40#define IOCTL_ATA_PASS_THROUGH CTL_CODE(IOCTL_SCSI_BASE,0x040b,METHOD_BUFFERED,FILE_READ_ACCESS | FILE_WRITE_ACCESS)
41#define IOCTL_ATA_PASS_THROUGH_DIRECT CTL_CODE(IOCTL_SCSI_BASE,0x040c,METHOD_BUFFERED,FILE_READ_ACCESS | FILE_WRITE_ACCESS)
76 typedef struct _SCSI_PASS_THROUGH32 {
83 UCHAR SenseInfoLength;
85 ULONG DataTransferLength;
88 ULONG SenseInfoOffset;
90 } SCSI_PASS_THROUGH32,*PSCSI_PASS_THROUGH32;
92 typedef struct _SCSI_PASS_THROUGH_DIRECT32 {
99 UCHAR SenseInfoLength;
101 ULONG DataTransferLength;
104 ULONG SenseInfoOffset;
106 } SCSI_PASS_THROUGH_DIRECT32,*PSCSI_PASS_THROUGH_DIRECT32;
150typedef struct _SCSI_PASS_THROUGH32_EX
155 ULONG StorAddressLength;
157 UCHAR SenseInfoLength;
161 ULONG StorAddressOffset;
162 ULONG SenseInfoOffset;
163 ULONG DataOutTransferLength;
164 ULONG DataInTransferLength;
168} SCSI_PASS_THROUGH32_EX, *PSCSI_PASS_THROUGH32_EX;
170typedef struct _SCSI_PASS_THROUGH_DIRECT32_EX
175 ULONG StorAddressLength;
177 UCHAR SenseInfoLength;
181 ULONG StorAddressOffset;
182 ULONG SenseInfoOffset;
183 ULONG DataOutTransferLength;
184 ULONG DataInTransferLength;
188} SCSI_PASS_THROUGH_DIRECT32_EX, *PSCSI_PASS_THROUGH_DIRECT32_EX;
223 typedef struct _ATA_PASS_THROUGH_EX32 {
229 UCHAR ReservedAsUchar;
230 ULONG DataTransferLength;
232 ULONG ReservedAsUlong;
234 UCHAR PreviousTaskFile[8];
235 UCHAR CurrentTaskFile[8];
236 } ATA_PASS_THROUGH_EX32,*PATA_PASS_THROUGH_EX32;
238 typedef struct _ATA_PASS_THROUGH_DIRECT32 {
244 UCHAR ReservedAsUchar;
245 ULONG DataTransferLength;
247 ULONG ReservedAsUlong;
249 UCHAR PreviousTaskFile[8];
250 UCHAR CurrentTaskFile[8];
251 } ATA_PASS_THROUGH_DIRECT32,*PATA_PASS_THROUGH_DIRECT32;
254#define ATA_FLAGS_DRDY_REQUIRED (1 << 0)
255#define ATA_FLAGS_DATA_IN (1 << 1)
256#define ATA_FLAGS_DATA_OUT (1 << 2)
257#define ATA_FLAGS_48BIT_COMMAND (1 << 3)
258#define ATA_FLAGS_USE_DMA (1 << 4)
324#define SCSI_IOCTL_DATA_OUT 0
325#define SCSI_IOCTL_DATA_IN 1
326#define SCSI_IOCTL_DATA_UNSPECIFIED 2
_In_ ULONG _In_ BOOLEAN _In_ ULONG _In_ UCHAR _In_ UCHAR _In_ UCHAR Lun
_In_ ULONG _In_ BOOLEAN _In_ ULONG _In_ UCHAR PathId
_In_ ULONG _In_ BOOLEAN _In_ ULONG _In_ UCHAR _In_ UCHAR TargetId
struct _SCSI_PASS_THROUGH_DIRECT * PSCSI_PASS_THROUGH_DIRECT
struct _SCSI_PASS_THROUGH * PSCSI_PASS_THROUGH
struct _IO_SCSI_CAPABILITIES * PIO_SCSI_CAPABILITIES
struct _SCSI_PASS_THROUGH_DIRECT SCSI_PASS_THROUGH_DIRECT
struct _SCSI_INQUIRY_DATA SCSI_INQUIRY_DATA
struct _SCSI_ADAPTER_BUS_INFO SCSI_ADAPTER_BUS_INFO
struct _SRB_IO_CONTROL * PSRB_IO_CONTROL
struct _SCSI_ADDRESS * PSCSI_ADDRESS
struct _SCSI_INQUIRY_DATA * PSCSI_INQUIRY_DATA
struct _SCSI_BUS_DATA SCSI_BUS_DATA
struct _SCSI_ADDRESS SCSI_ADDRESS
struct _SCSI_BUS_DATA * PSCSI_BUS_DATA
struct _DUMP_POINTERS * PDUMP_POINTERS
struct _SRB_IO_CONTROL SRB_IO_CONTROL
struct _IO_SCSI_CAPABILITIES IO_SCSI_CAPABILITIES
struct _SCSI_PASS_THROUGH SCSI_PASS_THROUGH
struct _SCSI_ADAPTER_BUS_INFO * PSCSI_ADAPTER_BUS_INFO
struct _DUMP_POINTERS DUMP_POINTERS
_In_ ULONG _In_ ULONG _In_ ULONG Length
#define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8)
_In_opt_ WDFREQUEST _In_ ULONG _In_ BOOLEAN _In_ PCDB Cdb
struct _ATA_PASS_THROUGH_DIRECT ATA_PASS_THROUGH_DIRECT
struct _SCSI_PASS_THROUGH_DIRECT_EX SCSI_PASS_THROUGH_DIRECT_EX
struct _ATA_PASS_THROUGH_EX * PATA_PASS_THROUGH_EX
struct _ATA_PASS_THROUGH_DIRECT * PATA_PASS_THROUGH_DIRECT
struct _SCSI_PASS_THROUGH_DIRECT_EX * PSCSI_PASS_THROUGH_DIRECT_EX
struct _SCSI_PASS_THROUGH_EX SCSI_PASS_THROUGH_EX
struct _SCSI_PASS_THROUGH_EX * PSCSI_PASS_THROUGH_EX
struct _ATA_PASS_THROUGH_EX ATA_PASS_THROUGH_EX
UCHAR PreviousTaskFile[8]
UCHAR PreviousTaskFile[8]
ULONG_PTR DataBufferOffset
BOOLEAN AllocateCommonBuffers
LARGE_INTEGER CommonBufferPa
struct _ADAPTER_OBJECT * AdapterObject
ULONG MaximumTransferLength
ULONG SupportedAsynchronousEvents
ULONG MaximumPhysicalPages
UCHAR NumberOfLogicalUnits
ULONG NextInquiryDataOffset
ULONG DataInTransferLength
ULONG DataOutTransferLength
ULONG_PTR DataInBufferOffset
ULONG DataInTransferLength
ULONG DataOutTransferLength
ULONG_PTR DataOutBufferOffset
ULONG_PTR DataBufferOffset
_Must_inspect_result_ _In_ WDFDEVICE _In_ LPCGUID _Out_ PINTERFACE _In_ USHORT _In_ USHORT Version
_Reserved_ PVOID Reserved