5 * Copyright (C) 2005-2013 Team XBMC
8 * This Program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2, or (at your option)
13 * This Program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with XBMC; see the file COPYING. If not, see
20 * <http://www.gnu.org/licenses/>.
24 //** Defines taken from ntddscsi.h in MS Windows DDK CD
25 #define SCSI_IOCTL_DATA_OUT 0 //Give data to SCSI device (e.g. for writing)
26 #define SCSI_IOCTL_DATA_IN 1 //Get data from SCSI device (e.g. for reading)
27 #define SCSI_IOCTL_DATA_UNSPECIFIED 2 //No data (e.g. for ejecting)
29 #define MAX_SENSE_LEN 18 //Sense data max length
31 #define IOCTL_SCSI_PASS_THROUGH 0x4D004
32 typedef struct _SCSI_PASS_THROUGH {
39 UCHAR SenseInfoLength;
41 ULONG DataTransferLength;
43 ULONG_PTR DataBufferOffset;
44 ULONG SenseInfoOffset;
46 }SCSI_PASS_THROUGH, *PSCSI_PASS_THROUGH;
48 #define IOCTL_SCSI_PASS_THROUGH_DIRECT 0x4D014
49 typedef struct _SCSI_PASS_THROUGH_DIRECT {
56 UCHAR SenseInfoLength;
58 ULONG DataTransferLength;
61 ULONG SenseInfoOffset;
63 }SCSI_PASS_THROUGH_DIRECT, *PSCSI_PASS_THROUGH_DIRECT;
64 //** End of defines taken from ntddscsi.h from MS Windows DDK CD
66 typedef struct _SCSI_PASS_THROUGH_AND_BUFFERS {
67 SCSI_PASS_THROUGH spt;
68 BYTE DataBuffer[64*1024];
71 typedef struct _SCSI_PASS_THROUGH_DIRECT_AND_SENSE_BUFFER {
72 SCSI_PASS_THROUGH_DIRECT sptd;
73 UCHAR SenseBuf[MAX_SENSE_LEN];