Fixes char array in structure dumping.
[wine.git] / include / ntddstor.h
blobcbc9b5d22148a226c90fc7726053fe1506de455b
1 /* DDK definitions for storage media access */
3 #ifndef _NTDDSTOR_H_
4 #define _NTDDSTOR_H_
6 #ifdef __cplusplus
7 extern "C" {
8 #endif
10 #define IOCTL_STORAGE_BASE FILE_DEVICE_MASS_STORAGE
12 #define IOCTL_STORAGE_CHECK_VERIFY CTL_CODE(IOCTL_STORAGE_BASE, 0x0200, METHOD_BUFFERED, FILE_READ_ACCESS)
13 #define IOCTL_STORAGE_MEDIA_REMOVAL CTL_CODE(IOCTL_STORAGE_BASE, 0x0201, METHOD_BUFFERED, FILE_READ_ACCESS)
14 #define IOCTL_STORAGE_EJECT_MEDIA CTL_CODE(IOCTL_STORAGE_BASE, 0x0202, METHOD_BUFFERED, FILE_READ_ACCESS)
15 #define IOCTL_STORAGE_LOAD_MEDIA CTL_CODE(IOCTL_STORAGE_BASE, 0x0203, METHOD_BUFFERED, FILE_READ_ACCESS)
16 #define IOCTL_STORAGE_RESERVE CTL_CODE(IOCTL_STORAGE_BASE, 0x0204, METHOD_BUFFERED, FILE_READ_ACCESS)
17 #define IOCTL_STORAGE_RELEASE CTL_CODE(IOCTL_STORAGE_BASE, 0x0205, METHOD_BUFFERED, FILE_READ_ACCESS)
18 #define IOCTL_STORAGE_FIND_NEW_DEVICES CTL_CODE(IOCTL_STORAGE_BASE, 0x0206, METHOD_BUFFERED, FILE_READ_ACCESS)
19 #define IOCTL_STORAGE_GET_MEDIA_TYPES CTL_CODE(IOCTL_STORAGE_BASE, 0x0300, METHOD_BUFFERED, FILE_ANY_ACCESS)
20 #define IOCTL_STORAGE_GET_MEDIA_TYPES_EX CTL_CODE(IOCTL_STORAGE_BASE, 0x0301, METHOD_BUFFERED, FILE_ANY_ACCESS)
21 #define IOCTL_STORAGE_RESET_BUS CTL_CODE(IOCTL_STORAGE_BASE, 0x0400, METHOD_BUFFERED, FILE_READ_ACCESS)
22 #define IOCTL_STORAGE_RESET_DEVICE CTL_CODE(IOCTL_STORAGE_BASE, 0x0401, METHOD_BUFFERED, FILE_READ_ACCESS)
23 #define IOCTL_STORAGE_GET_DEVICE_NUMBER CTL_CODE(IOCTL_STORAGE_BASE, 0x0420, METHOD_BUFFERED, FILE_ANY_ACCESS)
24 #define IOCTL_STORAGE_QUERY_PROPERTY CTL_CODE(IOCTL_STORAGE_BASE, 0x0500, METHOD_BUFFERED, FILE_ANY_ACCESS)
26 typedef struct _STORAGE_DEVICE_NUMBER {
27 DEVICE_TYPE DeviceType;
28 ULONG DeviceNumber;
29 ULONG PartitionNumber;
30 } STORAGE_DEVICE_NUMBER, *PSTORAGE_DEVICE_NUMBER;
32 typedef struct _STORAGE_BUS_RESET_REQUEST {
33 UCHAR PathId;
34 } STORAGE_BUS_RESET_REQUEST, *PSTORAGE_BUS_RESET_REQUEST;
36 typedef struct _PREVENT_MEDIA_REMOVAL {
37 BOOLEAN PreventMediaRemoval;
38 } PREVENT_MEDIA_REMOVAL, *PPREVENT_MEDIA_REMOVAL;
40 typedef struct _TAPE_STATISTICS {
41 ULONG Version;
42 ULONG Flags;
43 LARGE_INTEGER RecoveredWrites;
44 LARGE_INTEGER UnrecoveredWrites;
45 LARGE_INTEGER RecoveredReads;
46 LARGE_INTEGER UnrecoveredReads;
47 UCHAR CompressionRatioReads;
48 UCHAR CompressionRatioWrites;
49 } TAPE_STATISTICS, *PTAPE_STATISTICS;
51 #define RECOVERED_WRITES_VALID 0x00000001
52 #define UNRECOVERED_WRITES_VALID 0x00000002
53 #define RECOVERED_READS_VALID 0x00000004
54 #define UNRECOVERED_READS_VALID 0x00000008
55 #define WRITE_COMPRESSION_INFO_VALID 0x00000010
56 #define READ_COMPRESSION_INFO_VALID 0x00000020
58 typedef struct _TAPE_GET_STATISTICS {
59 ULONG Operation;
60 } TAPE_GET_STATISTICS, *PTAPE_GET_STATISTICS;
62 #define TAPE_RETURN_STATISTICS 0L
63 #define TAPE_RETURN_ENV_INFO 1L
64 #define TAPE_RESET_STATISTICS 2L
66 typedef enum _STORAGE_MEDIA_TYPE {
67 /* see also defines in ntdddisk.h */
69 DDS_4mm = 0x20,
70 MiniQic,
71 Travan,
72 QIC,
73 MP_8mm,
74 AME_8mm,
75 AIT1_8mm,
76 DLT,
77 NCTP,
78 IBM_3480,
79 IBM_3490E,
80 IBM_Magstar_3590,
81 IBM_Magstar_MP,
82 STK_DATA_D3,
83 SONY_DTF,
84 DV_6mm,
85 DMI,
86 SONY_D2,
87 CLEANER_CARTRIDGE,
88 CD_ROM,
89 CD_R,
90 CD_RW,
91 DVD_ROM,
92 DVD_R,
93 DVD_RW,
94 MO_3_RW,
95 MO_5_WO,
96 MO_5_RW,
97 MO_5_LIMDOW,
98 PC_5_WO,
99 PC_5_RW,
100 PD_5_RW,
101 ABL_5_WO,
102 PINNACLE_APEX_5_RW,
103 SONY_12_WO,
104 PHILIPS_12_WO,
105 HITACHI_12_WO,
106 CYGNET_12_WO,
107 KODAK_14_WO,
108 MO_NFR_525,
109 NIKON_12_RW,
110 IOMEGA_ZIP,
111 IOMEGA_JAZ,
112 SYQUEST_EZ135,
113 SYQUEST_EZFLYER,
114 SYQUEST_SYJET,
115 AVATAR_F2,
116 MP2_8mm
117 } STORAGE_MEDIA_TYPE, *PSTORAGE_MEDIA_TYPE;
119 #define MEDIA_ERASEABLE 0x00000001
120 #define MEDIA_WRITE_ONCE 0x00000002
121 #define MEDIA_READ_ONLY 0x00000004
122 #define MEDIA_READ_WRITE 0x00000008
123 #define MEDIA_WRITE_PROTECTED 0x00000100
124 #define MEDIA_CURRENTLY_MOUNTED 0x80000000
126 typedef struct _DEVICE_MEDIA_INFO {
127 union {
128 struct {
129 LARGE_INTEGER Cylinders;
130 STORAGE_MEDIA_TYPE MediaType;
131 ULONG TracksPerCylinder;
132 ULONG SectorsPerTrack;
133 ULONG BytesPerSector;
134 ULONG NumberMediaSides;
135 ULONG MediaCharacteristics;
136 } DiskInfo;
137 struct {
138 LARGE_INTEGER Cylinders;
139 STORAGE_MEDIA_TYPE MediaType;
140 ULONG TracksPerCylinder;
141 ULONG SectorsPerTrack;
142 ULONG BytesPerSector;
143 ULONG NumberMediaSides;
144 ULONG MediaCharacteristics;
145 } RemovableDiskInfo;
146 struct {
147 STORAGE_MEDIA_TYPE MediaType;
148 ULONG MediaCharacteristics;
149 ULONG CurrentBlockSize;
150 } TapeInfo;
151 } DeviceSpecific;
152 } DEVICE_MEDIA_INFO, *PDEVICE_MEDIA_INFO;
154 typedef struct _GET_MEDIA_TYPES {
155 ULONG DeviceType;
156 ULONG MediaInfoCount;
157 DEVICE_MEDIA_INFO MediaInfo[1];
158 } GET_MEDIA_TYPES, *PGET_MEDIA_TYPES;
160 typedef enum _STORAGE_QUERY_TYPE {
161 PropertyStandardQuery = 0,
162 PropertyExistsQuery,
163 PropertyMaskQuery,
164 PropertyQueryMaxDefined
165 } STORAGE_QUERY_TYPE, *PSTORAGE_QUERY_TYPE;
167 typedef enum _STORAGE_PROPERTY_ID {
168 StorageDeviceProperty = 0,
169 StorageAdapterProperty
170 } STORAGE_PROPERTY_ID, *PSTORAGE_PROPERTY_ID;
172 typedef struct _STORAGE_PROPERTY_QUERY {
173 STORAGE_PROPERTY_ID PropertyId;
174 STORAGE_QUERY_TYPE QueryType;
175 UCHAR AdditionalParameters[1];
176 } STORAGE_PROPERTY_QUERY, *PSTORAGE_PROPERTY_QUERY;
178 typedef struct _STORAGE_DESCRIPTOR_HEADER {
179 ULONG Version;
180 ULONG Size;
181 } STORAGE_DESCRIPTOR_HEADER, *PSTORAGE_DESCRIPTOR_HEADER;
183 typedef enum _STORAGE_BUS_TYPE {
184 BusTypeUnknown = 0x00,
185 BusTypeScsi,
186 BusTypeAtapi,
187 BusTypeAta,
188 BusType1394,
189 BusTypeSsa,
190 BusTypeFibre,
191 BusTypeMaxReserved = 0x7F
192 } STORAGE_BUS_TYPE, *PSTORAGE_BUS_TYPE;
194 typedef struct _STORAGE_DEVICE_DESCRIPTOR {
195 ULONG Version;
196 ULONG Size;
197 UCHAR DeviceType;
198 UCHAR DeviceTypeModifier;
199 BOOLEAN RemovableMedia;
200 BOOLEAN CommandQueueing;
201 ULONG VendorIdOffset;
202 ULONG ProductIdOffset;
203 ULONG ProductRevisionOffset;
204 ULONG SerialNumberOffset;
205 STORAGE_BUS_TYPE BusType;
206 ULONG RawPropertiesLength;
207 UCHAR RawDeviceProperties[1];
208 } STORAGE_DEVICE_DESCRIPTOR, *PSTORAGE_DEVICE_DESCRIPTOR;
210 typedef struct _STORAGE_ADAPTER_DESCRIPTOR {
211 ULONG Version;
212 ULONG Size;
213 ULONG MaximumTransferLength;
214 ULONG MaximumPhysicalPages;
215 ULONG AlignmentMask;
216 BOOLEAN AdapterUsesPio;
217 BOOLEAN AdapterScansDown;
218 BOOLEAN CommandQueueing;
219 BOOLEAN AcceleratedTransfer;
220 BOOLEAN BusType;
221 USHORT BusMajorVersion;
222 USHORT BusMinorVersion;
223 } STORAGE_ADAPTER_DESCRIPTOR, *PSTORAGE_ADAPTER_DESCRIPTOR;
225 #ifdef __cplusplus
227 #endif
229 #endif /* _NTDDSTOR_H_ */