ReactOS 0.4.15-dev-7887-g64a59a1
ntdddisk.h
Go to the documentation of this file.
1/*
2 * ntdddisk.h
3 *
4 * Disk IOCTL interface.
5 *
6 * This file is part of the w32api package.
7 *
8 * Contributors:
9 * Created by Casper S. Hornstrup <chorns@users.sourceforge.net>
10 *
11 * THIS SOFTWARE IS NOT COPYRIGHTED
12 *
13 * This source code is offered for use in the public domain. You may
14 * use, modify or distribute it freely.
15 *
16 * This code is distributed in the hope that it will be useful but
17 * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
18 * DISCLAIMED. This includes but is not limited to warranties of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
20 *
21 */
22
23#ifndef _NTDDDISK_H_
24#define _NTDDDISK_H_
25
26/* Helper macro to enable gcc's extension. */
27#ifndef __GNU_EXTENSION
28#ifdef __GNUC__
29#define __GNU_EXTENSION __extension__
30#else
31#define __GNU_EXTENSION
32#endif
33#endif
34
35#include "ntddstor.h"
36
37#ifdef __cplusplus
38extern "C" {
39#endif
40
41#define DD_DISK_DEVICE_NAME "\\Device\\UNKNOWN"
42#define DD_DISK_DEVICE_NAME_U L"\\Device\\UNKNOWN"
43
44#define IOCTL_DISK_BASE FILE_DEVICE_DISK
45
46#define IOCTL_DISK_ARE_VOLUMES_READY \
47 CTL_CODE(IOCTL_DISK_BASE, 0x0087, METHOD_BUFFERED, FILE_READ_ACCESS)
48
49#define IOCTL_DISK_CHECK_VERIFY \
50 CTL_CODE(IOCTL_DISK_BASE, 0x0200, METHOD_BUFFERED, FILE_READ_ACCESS)
51
52#define IOCTL_DISK_CONTROLLER_NUMBER \
53 CTL_CODE(IOCTL_DISK_BASE, 0x0011, METHOD_BUFFERED, FILE_ANY_ACCESS)
54
55#define IOCTL_DISK_CREATE_DISK \
56 CTL_CODE(IOCTL_DISK_BASE, 0x0016, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
57
58#define IOCTL_DISK_DELETE_DRIVE_LAYOUT \
59 CTL_CODE(IOCTL_DISK_BASE, 0x0040, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
60
61#define IOCTL_DISK_FIND_NEW_DEVICES \
62 CTL_CODE(IOCTL_DISK_BASE, 0x0206, METHOD_BUFFERED, FILE_READ_ACCESS)
63
64#define IOCTL_DISK_FORMAT_DRIVE \
65 CTL_CODE(IOCTL_DISK_BASE, 0x00f3, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
66
67#define IOCTL_DISK_FORMAT_TRACKS \
68 CTL_CODE(IOCTL_DISK_BASE, 0x0006, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
69
70#define IOCTL_DISK_FORMAT_TRACKS_EX \
71 CTL_CODE(IOCTL_DISK_BASE, 0x000b, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
72
73#define IOCTL_DISK_GET_CACHE_INFORMATION \
74 CTL_CODE(IOCTL_DISK_BASE, 0x0035, METHOD_BUFFERED, FILE_READ_ACCESS)
75
76#define IOCTL_DISK_GET_CACHE_SETTING \
77 CTL_CODE(IOCTL_DISK_BASE, 0x0038, METHOD_BUFFERED, FILE_READ_ACCESS)
78
79#define IOCTL_DISK_GET_CLUSTER_INFO \
80 CTL_CODE(IOCTL_DISK_BASE, 0x0085, METHOD_BUFFERED, FILE_ANY_ACCESS)
81
82#define IOCTL_DISK_GET_DISK_ATTRIBUTES \
83 CTL_CODE(IOCTL_DISK_BASE, 0x003c, METHOD_BUFFERED, FILE_ANY_ACCESS)
84
85#define IOCTL_DISK_GET_DRIVE_GEOMETRY \
86 CTL_CODE(IOCTL_DISK_BASE, 0x0000, METHOD_BUFFERED, FILE_ANY_ACCESS)
87
88#define IOCTL_DISK_GET_DRIVE_GEOMETRY_EX \
89 CTL_CODE(IOCTL_DISK_BASE, 0x0028, METHOD_BUFFERED, FILE_ANY_ACCESS)
90
91#define IOCTL_DISK_GET_DRIVE_LAYOUT \
92 CTL_CODE(IOCTL_DISK_BASE, 0x0003, METHOD_BUFFERED, FILE_READ_ACCESS)
93
94#define IOCTL_DISK_GET_DRIVE_LAYOUT_EX \
95 CTL_CODE(IOCTL_DISK_BASE, 0x0014, METHOD_BUFFERED, FILE_ANY_ACCESS)
96
97#define IOCTL_DISK_GET_MEDIA_TYPES \
98 CTL_CODE(IOCTL_DISK_BASE, 0x0300, METHOD_BUFFERED, FILE_ANY_ACCESS)
99
100#define IOCTL_DISK_GET_LENGTH_INFO \
101 CTL_CODE(IOCTL_DISK_BASE, 0x0017, METHOD_BUFFERED, FILE_READ_ACCESS)
102
103#define IOCTL_DISK_GET_PARTITION_ATTRIBUTES \
104 CTL_CODE(IOCTL_DISK_BASE, 0x003a, METHOD_BUFFERED, FILE_ANY_ACCESS)
105
106#define IOCTL_DISK_GET_PARTITION_INFO \
107 CTL_CODE(IOCTL_DISK_BASE, 0x0001, METHOD_BUFFERED, FILE_READ_ACCESS)
108
109#define IOCTL_DISK_GET_PARTITION_INFO_EX \
110 CTL_CODE(IOCTL_DISK_BASE, 0x0012, METHOD_BUFFERED, FILE_ANY_ACCESS)
111
112#define IOCTL_DISK_GET_PERFORMANCE_INFO \
113 CTL_CODE(IOCTL_DISK_BASE, 0x0089, METHOD_BUFFERED, FILE_ANY_ACCESS)
114
115#define IOCTL_DISK_GET_SAN_SETTINGS \
116 CTL_CODE(IOCTL_DISK_BASE, 0x0080, METHOD_BUFFERED, FILE_READ_ACCESS)
117
118#define IOCTL_DISK_GET_SNAPSHOT_INFO \
119 CTL_CODE(IOCTL_DISK_BASE, 0x0082, METHOD_BUFFERED, FILE_READ_ACCESS)
120
121#define IOCTL_DISK_GROW_PARTITION \
122 CTL_CODE(IOCTL_DISK_BASE, 0x0034, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
123
124#define IOCTL_DISK_HISTOGRAM_STRUCTURE \
125 CTL_CODE(IOCTL_DISK_BASE, 0x000c, METHOD_BUFFERED, FILE_ANY_ACCESS)
126
127#define IOCTL_DISK_HISTOGRAM_DATA \
128 CTL_CODE(IOCTL_DISK_BASE, 0x000d, METHOD_BUFFERED, FILE_ANY_ACCESS)
129
130#define IOCTL_DISK_HISTOGRAM_RESET \
131 CTL_CODE(IOCTL_DISK_BASE, 0x000e, METHOD_BUFFERED, FILE_ANY_ACCESS)
132
133#define IOCTL_DISK_INTERNAL_CLEAR_VERIFY \
134 CTL_CODE(IOCTL_DISK_BASE, 0x0101, METHOD_NEITHER, FILE_ANY_ACCESS)
135
136#define IOCTL_DISK_INTERNAL_SET_VERIFY \
137 CTL_CODE(IOCTL_DISK_BASE, 0x0100, METHOD_NEITHER, FILE_ANY_ACCESS)
138
139#define IOCTL_DISK_INTERNAL_SET_NOTIFY \
140 CTL_CODE(IOCTL_DISK_BASE, 0x0102, METHOD_BUFFERED, FILE_ANY_ACCESS)
141
142#define IOCTL_DISK_IS_CLUSTERED \
143 CTL_CODE(IOCTL_DISK_BASE, 0x003e, METHOD_BUFFERED, FILE_ANY_ACCESS)
144
145#define IOCTL_DISK_IS_WRITABLE \
146 CTL_CODE(IOCTL_DISK_BASE, 0x0009, METHOD_BUFFERED, FILE_ANY_ACCESS)
147
148#define IOCTL_DISK_LOGGING \
149 CTL_CODE(IOCTL_DISK_BASE, 0x000a, METHOD_BUFFERED, FILE_ANY_ACCESS)
150
151#define IOCTL_DISK_PERFORMANCE \
152 CTL_CODE(IOCTL_DISK_BASE, 0x0008, METHOD_BUFFERED, FILE_ANY_ACCESS)
153
154#define IOCTL_DISK_PERFORMANCE_OFF \
155 CTL_CODE(IOCTL_DISK_BASE, 0x0018, METHOD_BUFFERED, FILE_ANY_ACCESS)
156
157#define IOCTL_DISK_REASSIGN_BLOCKS \
158 CTL_CODE(IOCTL_DISK_BASE, 0x0007, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
159
160#define IOCTL_DISK_REQUEST_DATA \
161 CTL_CODE(IOCTL_DISK_BASE, 0x0010, METHOD_BUFFERED, FILE_ANY_ACCESS)
162
163#define IOCTL_DISK_REQUEST_STRUCTURE \
164 CTL_CODE(IOCTL_DISK_BASE, 0x000f, METHOD_BUFFERED, FILE_ANY_ACCESS)
165
166#define IOCTL_DISK_RESET_SNAPSHOT_INFO \
167 CTL_CODE(IOCTL_DISK_BASE, 0x0084, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
168
169#define IOCTL_DISK_MEDIA_REMOVAL \
170 CTL_CODE(IOCTL_DISK_BASE, 0x0201, METHOD_BUFFERED, FILE_READ_ACCESS)
171
172#define IOCTL_DISK_EJECT_MEDIA \
173 CTL_CODE(IOCTL_DISK_BASE, 0x0202, METHOD_BUFFERED, FILE_READ_ACCESS)
174
175#define IOCTL_DISK_LOAD_MEDIA \
176 CTL_CODE(IOCTL_DISK_BASE, 0x0203, METHOD_BUFFERED, FILE_READ_ACCESS)
177
178#define IOCTL_DISK_REASSIGN_BLOCKS_EX \
179 CTL_CODE(IOCTL_DISK_BASE, 0x0029, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
180
181#define IOCTL_DISK_RESERVE \
182 CTL_CODE(IOCTL_DISK_BASE, 0x0204, METHOD_BUFFERED, FILE_READ_ACCESS)
183
184#define IOCTL_DISK_RELEASE \
185 CTL_CODE(IOCTL_DISK_BASE, 0x0205, METHOD_BUFFERED, FILE_READ_ACCESS)
186
187#define IOCTL_DISK_FIND_NEW_DEVICES \
188 CTL_CODE(IOCTL_DISK_BASE, 0x0206, METHOD_BUFFERED, FILE_READ_ACCESS)
189
190#define IOCTL_DISK_SENSE_DEVICE \
191 CTL_CODE(IOCTL_DISK_BASE, 0x00f8, METHOD_BUFFERED, FILE_ANY_ACCESS)
192
193#define IOCTL_DISK_SET_CACHE_INFORMATION \
194 CTL_CODE(IOCTL_DISK_BASE, 0x0036, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
195
196#define IOCTL_DISK_SET_CACHE_SETTING \
197 CTL_CODE(IOCTL_DISK_BASE, 0x0039, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
198
199#define IOCTL_DISK_SET_CLUSTER_INFO \
200 CTL_CODE(IOCTL_DISK_BASE, 0x0086, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
201
202#define IOCTL_DISK_SET_DISK_ATTRIBUTES \
203 CTL_CODE(IOCTL_DISK_BASE, 0x003d, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
204
205#define IOCTL_DISK_SET_DRIVE_LAYOUT \
206 CTL_CODE(IOCTL_DISK_BASE, 0x0004, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
207
208#define IOCTL_DISK_SET_DRIVE_LAYOUT_EX \
209 CTL_CODE(IOCTL_DISK_BASE, 0x0015, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
210
211#define IOCTL_DISK_SET_PARTITION_ATTRIBUTES \
212 CTL_CODE(IOCTL_DISK_BASE, 0x003b, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
213
214#define IOCTL_DISK_SET_PARTITION_INFO \
215 CTL_CODE(IOCTL_DISK_BASE, 0x0002, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
216
217#define IOCTL_DISK_SET_PARTITION_INFO_EX \
218 CTL_CODE(IOCTL_DISK_BASE, 0x0013, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
219
220#define IOCTL_DISK_SET_SAN_SETTINGS \
221 CTL_CODE(IOCTL_DISK_BASE, 0x0081, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
222
223#define IOCTL_DISK_SET_SNAPSHOT_INFO \
224 CTL_CODE(IOCTL_DISK_BASE, 0x0083, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
225
226//
227// NTDDI_WIN2003 was an older define used in the early beta builds, which
228// Microsoft forgot to fix in a few headers.
229// NTDDI_WS03 is the correct term.
230//
231#if (NTDDI_VERSION < NTDDI_WS03)
232#define IOCTL_DISK_GET_WRITE_CACHE_STATE \
233 CTL_CODE(IOCTL_DISK_BASE, 0x0037, METHOD_BUFFERED, FILE_READ_ACCESS)
234#else
235#define OBSOLETE_DISK_GET_WRITE_CACHE_STATE \
236 CTL_CODE(IOCTL_DISK_BASE, 0x0037, METHOD_BUFFERED, FILE_READ_ACCESS)
237#endif
238
239#define IOCTL_DISK_UPDATE_DRIVE_SIZE \
240 CTL_CODE(IOCTL_DISK_BASE, 0x0032, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
241
242#define IOCTL_DISK_UPDATE_PROPERTIES \
243 CTL_CODE(IOCTL_DISK_BASE, 0x0050, METHOD_BUFFERED, FILE_ANY_ACCESS)
244
245#define IOCTL_DISK_VERIFY \
246 CTL_CODE(IOCTL_DISK_BASE, 0x0005, METHOD_BUFFERED, FILE_ANY_ACCESS)
247
248#define IOCTL_DISK_VOLUMES_ARE_READY \
249 CTL_CODE(IOCTL_DISK_BASE, 0x0088, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
250
251#define IOCTL_DISK_COPY_DATA \
252 CTL_CODE(IOCTL_DISK_BASE, 0x0019, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
253
254#define IOCTL_DISK_SIMBAD \
255 CTL_CODE(IOCTL_DISK_BASE, 0x0400, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
256
257#define SMART_GET_VERSION \
258 CTL_CODE(IOCTL_DISK_BASE, 0x0020, METHOD_BUFFERED, FILE_READ_ACCESS)
259
260#define SMART_RCV_DRIVE_DATA \
261 CTL_CODE(IOCTL_DISK_BASE, 0x0022, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
262
263#define SMART_SEND_DRIVE_COMMAND \
264 CTL_CODE(IOCTL_DISK_BASE, 0x0021, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
265
266#define PARTITION_ENTRY_UNUSED 0x00
267#define PARTITION_FAT_12 0x01
268#define PARTITION_XENIX_1 0x02
269#define PARTITION_XENIX_2 0x03
270#define PARTITION_FAT_16 0x04
271#define PARTITION_EXTENDED 0x05
272#define PARTITION_HUGE 0x06
273#define PARTITION_IFS 0x07
274#define PARTITION_OS2BOOTMGR 0x0A
275#define PARTITION_FAT32 0x0B
276#define PARTITION_FAT32_XINT13 0x0C
277#define PARTITION_XINT13 0x0E
278#define PARTITION_XINT13_EXTENDED 0x0F
279#define PARTITION_MSFT_RECOVERY 0x27
280#define PARTITION_MAIN_OS 0x28
281#define PARTIITON_OS_DATA 0x29
282#define PARTITION_PRE_INSTALLED 0x2a
283#define PARTITION_BSP 0x2b
284#define PARTITION_DPP 0x2c
285#define PARTITION_WINDOWS_SYSTEM 0x2d
286#define PARTITION_PREP 0x41
287#define PARTITION_LDM 0x42
288#define PARTITION_DM 0x54
289#define PARTITION_EZDRIVE 0x55
290#define PARTITION_UNIX 0x63
291#define PARTITION_SPACES_DATA 0xD7
292#define PARTITION_SPACES 0xE7
293#define PARTITION_GPT 0xEE
294#define PARTITION_SYSTEM 0xEF
295
296#define VALID_NTFT 0xC0
297#define PARTITION_NTFT 0x80
298#ifdef __REACTOS__
299#define PARTITION_OLD_LINUX 0x43
300#define PARTITION_LINUX 0x83
301#define PARTITION_ISO9660 0x96
302#define PARTITION_FREEBSD 0xA5
303#define PARTITION_OPENBSD 0xA6
304#define PARTITION_NETBSD 0xA9
305#endif
306
307#define IsFTPartition( PartitionType ) \
308 (((PartitionType) & PARTITION_NTFT) && (((PartitionType) & ~0xC0) == PARTITION_FAT_12)) || \
309 (((PartitionType) & PARTITION_NTFT) && (((PartitionType) & ~0xC0) == PARTITION_HUGE)) || \
310 (((PartitionType) & PARTITION_NTFT) && (((PartitionType) & ~0xC0) == PARTITION_IFS)) || \
311 (((PartitionType) & PARTITION_NTFT) && (((PartitionType) & ~0xC0) == PARTITION_FAT32)) || \
312 (((PartitionType) & PARTITION_NTFT) && (((PartitionType) & ~0xC0) == PARTITION_FAT32_XINT13)) || \
313 (((PartitionType) & PARTITION_NTFT) && (((PartitionType) & ~0xC0) == PARTITION_XINT13))
314
315
316#define IsContainerPartition(PartitionType) \
317 (((PartitionType) == PARTITION_EXTENDED) || \
318 ((PartitionType) == PARTITION_XINT13_EXTENDED))
319
320#ifdef __REACTOS__
321#define IsRecognizedPartition(PartitionType) ( \
322 (((PartitionType) & PARTITION_NTFT) && (((PartitionType) & ~0xC0) == PARTITION_FAT_12)) || \
323 (((PartitionType) & PARTITION_NTFT) && (((PartitionType) & ~0xC0) == PARTITION_HUGE)) || \
324 (((PartitionType) & PARTITION_NTFT) && (((PartitionType) & ~0xC0) == PARTITION_IFS)) || \
325 (((PartitionType) & PARTITION_NTFT) && (((PartitionType) & ~0xC0) == PARTITION_FAT32)) || \
326 (((PartitionType) & PARTITION_NTFT) && (((PartitionType) & ~0xC0) == PARTITION_FAT32_XINT13)) || \
327 (((PartitionType) & PARTITION_NTFT) && (((PartitionType) & ~0xC0) == PARTITION_XINT13)) || \
328 ((PartitionType) == PARTITION_FAT_12) || \
329 ((PartitionType) == PARTITION_FAT_16) || \
330 ((PartitionType) == PARTITION_HUGE) || \
331 ((PartitionType) == PARTITION_IFS) || \
332 ((PartitionType) == PARTITION_FAT32) || \
333 ((PartitionType) == PARTITION_FAT32_XINT13) || \
334 ((PartitionType) == PARTITION_XINT13) || \
335 ((PartitionType) == PARTITION_LINUX) || \
336 ((PartitionType) == PARTITION_OLD_LINUX) || \
337 ((PartitionType) == PARTITION_ISO9660) || \
338 ((PartitionType) == PARTITION_FREEBSD) || \
339 ((PartitionType) == PARTITION_OPENBSD) || \
340 ((PartitionType) == PARTITION_NETBSD))
341#else
342#define IsRecognizedPartition(PartitionType) ( \
343 (((PartitionType) & PARTITION_NTFT) && (((PartitionType) & ~0xC0) == PARTITION_FAT_12)) || \
344 (((PartitionType) & PARTITION_NTFT) && (((PartitionType) & ~0xC0) == PARTITION_HUGE)) || \
345 (((PartitionType) & PARTITION_NTFT) && (((PartitionType) & ~0xC0) == PARTITION_IFS)) || \
346 (((PartitionType) & PARTITION_NTFT) && (((PartitionType) & ~0xC0) == PARTITION_FAT32)) || \
347 (((PartitionType) & PARTITION_NTFT) && (((PartitionType) & ~0xC0) == PARTITION_FAT32_XINT13)) || \
348 (((PartitionType) & PARTITION_NTFT) && (((PartitionType) & ~0xC0) == PARTITION_XINT13)) || \
349 ((PartitionType) == PARTITION_FAT_12) || \
350 ((PartitionType) == PARTITION_FAT_16) || \
351 ((PartitionType) == PARTITION_HUGE) || \
352 ((PartitionType) == PARTITION_IFS) || \
353 ((PartitionType) == PARTITION_FAT32) || \
354 ((PartitionType) == PARTITION_FAT32_XINT13) || \
355 ((PartitionType) == PARTITION_XINT13))
356#endif
357
358#if (_WIN32_WINNT >= 0x0500)
359/* Actually it should be > 0x0500, since this is not present in Windows 2000;
360 * however we keep >= 0x0500 for compatibility with MS PSDK. */
361
362#define GPT_ATTRIBUTE_PLATFORM_REQUIRED 0x00000001
363#define GPT_BASIC_DATA_ATTRIBUTE_READ_ONLY 0x10000000
364#define GPT_BASIC_DATA_ATTRIBUTE_SHADOW_COPY 0x20000000
365#define GPT_BASIC_DATA_ATTRIBUTE_HIDDEN 0x40000000
366#define GPT_BASIC_DATA_ATTRIBUTE_NO_DRIVE_LETTER 0x80000000
367#endif
368
369#define WMI_DISK_GEOMETRY_GUID \
370 {0x25007f51, 0x57c2, 0x11d1, {0xa5, 0x28, 0x0, 0xa0, 0xc9, 0x6, 0x29, 0x10}}
371
374
375typedef enum _MEDIA_TYPE {
403
404typedef struct _DISK_GEOMETRY {
411
422
428
432
433#if (_WIN32_WINNT >= 0x0500)
434/* Actually it should be > 0x0500, since this is not present in Windows 2000;
435 * however we keep >= 0x0500 for compatibility with MS PSDK. */
436
437typedef enum _PARTITION_STYLE {
440 PARTITION_STYLE_RAW,
441#ifdef __REACTOS__
442 /* ReactOS custom partition handlers */
443 PARTITION_STYLE_BRFR = 128 /* Xbox-BRFR partitioning scheme */
444#endif
446
447typedef struct _CREATE_DISK_GPT
448{
449 GUID DiskId;
450 ULONG MaxPartitionCount;
451} CREATE_DISK_GPT, *PCREATE_DISK_GPT;
452
453typedef struct _CREATE_DISK_MBR
454{
456} CREATE_DISK_MBR, *PCREATE_DISK_MBR;
457
458typedef struct _CREATE_DISK
459{
460 PARTITION_STYLE PartitionStyle;
461 union {
462 CREATE_DISK_MBR Mbr;
463 CREATE_DISK_GPT Gpt;
464 };
465} CREATE_DISK, *PCREATE_DISK;
466
467typedef enum _DETECTION_TYPE {
468 DetectNone,
469 DetectInt13,
470 DetectExInt13
471} DETECTION_TYPE;
472
473typedef struct _DISK_INT13_INFO {
474 USHORT DriveSelect;
475 ULONG MaxCylinders;
477 USHORT MaxHeads;
478 USHORT NumberDrives;
479} DISK_INT13_INFO, *PDISK_INT13_INFO;
480
481typedef struct _DISK_EX_INT13_INFO {
482 USHORT ExBufferSize;
483 USHORT ExFlags;
484 ULONG ExCylinders;
485 ULONG ExHeads;
486 ULONG ExSectorsPerTrack;
487 ULONG64 ExSectorsPerDrive;
488 USHORT ExSectorSize;
489 USHORT ExReserved;
490} DISK_EX_INT13_INFO, *PDISK_EX_INT13_INFO;
491
492typedef struct _DISK_DETECTION_INFO {
493 ULONG SizeOfDetectInfo;
494 DETECTION_TYPE DetectionType;
495 _ANONYMOUS_UNION union {
496 _ANONYMOUS_STRUCT struct {
497 DISK_INT13_INFO Int13;
498 DISK_EX_INT13_INFO ExInt13;
501} DISK_DETECTION_INFO, *PDISK_DETECTION_INFO;
502
503typedef struct _DISK_PARTITION_INFO {
504 ULONG SizeOfPartitionInfo;
505 PARTITION_STYLE PartitionStyle;
506 _ANONYMOUS_UNION union {
507 struct {
509 ULONG CheckSum;
510 } Mbr;
511 struct {
512 GUID DiskId;
513 } Gpt;
515} DISK_PARTITION_INFO, *PDISK_PARTITION_INFO;
516
517typedef struct _DISK_GEOMETRY_EX {
520 UCHAR Data[1];
522
523#if (NTDDI_VERSION < NTDDI_WS03)
524#define DiskGeometryGetPartition(Geometry) \
525 ((PDISK_PARTITION_INFO)((Geometry) + 1))
526
527#define DiskGeometryGetDetect(Geometry)\
528 ((PDISK_DETECTION_INFO)(((PBYTE)DiskGeometryGetPartition(Geometry) + \
529 DiskGeometryGetPartition(Geometry)->SizeOfPartitionInfo)))
530#else
531#define DiskGeometryGetPartition(Geometry) \
532 ((PDISK_PARTITION_INFO)((Geometry)->Data))
533
534#define DiskGeometryGetDetect(Geometry)\
535 ((PDISK_DETECTION_INFO)(((ULONG_PTR)DiskGeometryGetPartition(Geometry) + \
536 DiskGeometryGetPartition(Geometry)->SizeOfPartitionInfo)))
537#endif
538
539typedef struct _PARTITION_INFORMATION_GPT {
543 WCHAR Name [36];
545
546typedef struct _PARTITION_INFORMATION_MBR {
552
553typedef struct _PARTITION_INFORMATION_EX {
559#if (NTDDI_VERSION >= NTDDI_WIN10_RS3)
560 BOOLEAN IsServicePartition;
561#endif
562 _ANONYMOUS_UNION union {
567
568typedef struct _DRIVE_LAYOUT_INFORMATION_GPT {
569 GUID DiskId;
570 LARGE_INTEGER StartingUsableOffset;
571 LARGE_INTEGER UsableLength;
572 ULONG MaxPartitionCount;
573} DRIVE_LAYOUT_INFORMATION_GPT, *PDRIVE_LAYOUT_INFORMATION_GPT;
574
575typedef struct _DRIVE_LAYOUT_INFORMATION_MBR {
577#if (NTDDI_VERSION >= NTDDI_WIN10_RS1)
578 ULONG CheckSum;
579#endif
580} DRIVE_LAYOUT_INFORMATION_MBR, *PDRIVE_LAYOUT_INFORMATION_MBR;
581
582typedef struct _DRIVE_LAYOUT_INFORMATION_EX {
583 ULONG PartitionStyle;
584 ULONG PartitionCount;
585 __GNU_EXTENSION union {
586 DRIVE_LAYOUT_INFORMATION_MBR Mbr;
587 DRIVE_LAYOUT_INFORMATION_GPT Gpt;
588 };
589 PARTITION_INFORMATION_EX PartitionEntry[1];
590} DRIVE_LAYOUT_INFORMATION_EX, *PDRIVE_LAYOUT_INFORMATION_EX;
591
592typedef SET_PARTITION_INFORMATION SET_PARTITION_INFORMATION_MBR;
593typedef PARTITION_INFORMATION_GPT SET_PARTITION_INFORMATION_GPT;
594
595typedef struct _SET_PARTITION_INFORMATION_EX {
596 PARTITION_STYLE PartitionStyle;
597 _ANONYMOUS_UNION union {
598 SET_PARTITION_INFORMATION_MBR Mbr;
599 SET_PARTITION_INFORMATION_GPT Gpt;
601} SET_PARTITION_INFORMATION_EX, *PSET_PARTITION_INFORMATION_EX;
602
603#endif // (_WIN32_WINNT >= 0x0500)
604
605typedef struct _DISK_PERFORMANCE {
619
620typedef struct _FORMAT_EX_PARAMETERS {
630
631typedef struct _FORMAT_PARAMETERS {
638
639typedef struct _GET_LENGTH_INFORMATION {
642
643typedef struct _REASSIGN_BLOCKS {
648
649typedef struct _REASSIGN_BLOCKS_EX {
654
655typedef struct _VERIFY_INFORMATION {
659
660/* GETVERSIONINPARAMS.fCapabilities constants */
661#define CAP_ATA_ID_CMD 1
662#define CAP_ATAPI_ID_CMD 2
663#define CAP_SMART_CMD 4
664
665typedef struct _GETVERSIONINPARAMS {
673
674/* IDEREGS.bCommandReg constants */
675#define ATAPI_ID_CMD 0xA1
676#define ID_CMD 0xEC
677#define SMART_CMD 0xB0
678
679#define SMART_CYL_LOW 0x4F
680#define SMART_CYL_HI 0xC2
681
682typedef struct _IDEREGS {
692
693#include <pshpack1.h>
694typedef struct _SENDCMDINPARAMS {
698 UCHAR bReserved[3];
699 ULONG dwReserved[4];
700 UCHAR bBuffer[1];
702#include <poppack.h>
703
704/* DRIVERSTATUS.bDriverError constants */
705#define SMART_NO_ERROR 0
706#define SMART_IDE_ERROR 1
707#define SMART_INVALID_FLAG 2
708#define SMART_INVALID_COMMAND 3
709#define SMART_INVALID_BUFFER 4
710#define SMART_INVALID_DRIVE 5
711#define SMART_INVALID_IOCTL 6
712#define SMART_ERROR_NO_MEM 7
713#define SMART_INVALID_REGISTER 8
714#define SMART_NOT_SUPPORTED 9
715#define SMART_NO_IDE_DEVICE 10
716
717#define SMART_OFFLINE_ROUTINE_OFFLINE 0
718#define SMART_SHORT_SELFTEST_OFFLINE 1
719#define SMART_EXTENDED_SELFTEST_OFFLINE 2
720#define SMART_ABORT_OFFLINE_SELFTEST 127
721#define SMART_SHORT_SELFTEST_CAPTIVE 129
722#define SMART_EXTENDED_SELFTEST_CAPTIVE 130
723
724typedef struct _DRIVERSTATUS {
727 UCHAR bReserved[2];
728 ULONG dwReserved[2];
730
731#define READ_ATTRIBUTE_BUFFER_SIZE 512
732#define IDENTIFY_BUFFER_SIZE 512
733#define READ_THRESHOLD_BUFFER_SIZE 512
734#define SMART_LOG_SECTOR_SIZE 512
735
736#include <pshpack1.h>
737typedef struct _SENDCMDOUTPARAMS {
740 UCHAR bBuffer[1];
742#include <poppack.h>
743
744#define READ_ATTRIBUTES 0xD0
745#define READ_THRESHOLDS 0xD1
746#define ENABLE_DISABLE_AUTOSAVE 0xD2
747#define SAVE_ATTRIBUTE_VALUES 0xD3
748#define EXECUTE_OFFLINE_DIAGS 0xD4
749#define SMART_READ_LOG 0xD5
750#define SMART_WRITE_LOG 0xd6
751#define ENABLE_SMART 0xD8
752#define DISABLE_SMART 0xD9
753#define RETURN_SMART_STATUS 0xDA
754#define ENABLE_DISABLE_AUTO_OFFLINE 0xDB
755
756typedef struct _MAPPED_ADDRESS {
763
764
765#if (_WIN32_WINNT >= 0x0500)
766
767typedef enum {
772
773typedef enum _DISK_WRITE_CACHE_STATE {
774 DiskWriteCacheNormal,
775 DiskWriteCacheForceDisable,
776 DiskWriteCacheDisableNotSupported
777} DISK_WRITE_CACHE_STATE, *PDISK_WRITE_CACHE_STATE;
778
779
780typedef struct _DISK_CACHE_INFORMATION
781{
789 union {
790 struct {
795
796 struct {
800 };
801
803
804typedef struct _DISK_GROW_PARTITION {
808#endif
809
810// for IOCTL_DISK_CONTROLLER_NUMBER
811
816
817// for IOCTL_DISK_COPY_DATA
818
825
826// for IOCTL_DISK_GET_CACHE_SETTING and IOCTL_DISK_SET_CACHE_SETTING
827
828typedef enum _DISK_CACHE_STATE {
833
834typedef struct _DISK_CACHE_SETTING {
839
840#if (NTDDI_VERSION >= NTDDI_VISTA)
841
842// for IOCTL_DISK_GET_PARTITION_ATTRIBUTES and IOCTL_DISK_SET_PARTITION_ATTRIBUTES
843
849
857
858// for IOCTL_DISK_GET_DISK_ATTRIBUTES and IOCTL_DISK_SET_DISK_ATTRIBUTES
859
860#define DISK_ATTRIBUTE_OFFLINE 0x0000000000000001
861#define DISK_ATTRIBUTE_READ_ONLY 0x0000000000000002
862#define DISK_ATTRIBUTE_HIDDEN 0x0000000000000004
863#define DISK_ATTRIBUTE_MAINTENANCE 0x0000000000000008
864#define DISK_ATTRIBUTE_SPACES_BYPASS 0x0000000000000010
865
866typedef struct _GET_DISK_ATTRIBUTES {
871
872typedef struct _SET_DISK_ATTRIBUTES {
881
882
883// for IOCTL_DISK_GET_SAN_SETTINGS and IOCTL_DISK_SET_SAN_SETTINGS
884
885typedef enum _DISK_SAN_POLICY {
893
894typedef struct _DISK_SAN_SETTINGS {
898
899// for IOCTL_DISK_GET_SNAPSHOT_INFO and IOCTL_DISK_SET_SNAPSHOT_INFO
906
907typedef struct _DISK_SNAPSHOT_INFO {
919#endif /* NTDDI_VERSION >= NTDDI_VISTA */
920
921#if (NTDDI_VERSION >= NTDDI_WIN8)
922
923// for IOCTL_DISK_GET_CLUSTER_INFO and IOCTL_DISK_SET_CLUSTER_INFO
924
925#define DISK_CLUSTER_FLAG_ENABLED 0x0000000000000001
926#define DISK_CLUSTER_FLAG_CSV 0x0000000000000002
927#define DISK_CLUSTER_FLAG_IN_MAINTENANCE 0x0000000000000004
928#define DISK_CLUSTER_FLAG_PNP_ARRIVAL_COMPLETE 0x0000000000000008
929
930typedef struct _DISK_CLUSTER_INFO {
936
937// for IOCTL_DISK_GET_PERFORMANCE_INFO
938
944
949
966
967#endif /* NTDDI_VERSION >= NTDDI_WIN8 */
968
969
970#ifdef __cplusplus
971}
972#endif
973
974#endif /* _NTDDDISK_H_ */
unsigned char BOOLEAN
#define __GNU_EXTENSION
Definition: _mingw_mac.h:135
static const WCHAR Signature[]
Definition: parser.c:141
struct _PARTITION_INFORMATION_MBR * PPARTITION_INFORMATION_MBR
struct _PARTITION_INFORMATION_EX PARTITION_INFORMATION_EX
enum _PARTITION_STYLE PARTITION_STYLE
struct _PARTITION_INFORMATION_EX * PPARTITION_INFORMATION_EX
unsigned __int64 ULONG64
Definition: imports.h:198
struct _PARTITION_INFORMATION_MBR PARTITION_INFORMATION_MBR
_PARTITION_STYLE
Definition: imports.h:200
@ PARTITION_STYLE_GPT
Definition: imports.h:202
@ PARTITION_STYLE_MBR
Definition: imports.h:201
struct _PARTITION_INFORMATION_GPT * PPARTITION_INFORMATION_GPT
struct _PARTITION_INFORMATION_GPT PARTITION_INFORMATION_GPT
_In_ HANDLE _In_ DWORD _In_ DWORD _Inout_opt_ LPOVERLAPPED _In_opt_ LPTRANSMIT_FILE_BUFFERS _In_ DWORD dwReserved
Definition: mswsock.h:95
#define DUMMYUNIONNAME
Definition: ntbasedef.h:32
#define DUMMYSTRUCTNAME
Definition: ntbasedef.h:58
#define _ANONYMOUS_UNION
Definition: ntbasedef.h:30
#define _ANONYMOUS_STRUCT
Definition: ntbasedef.h:56
struct _DRIVE_LAYOUT_INFORMATION * PDRIVE_LAYOUT_INFORMATION
struct _GETVERSIONINPARAMS * LPGETVERSIONINPARAMS
struct _DRIVERSTATUS * PDRIVERSTATUS
struct _FORMAT_EX_PARAMETERS FORMAT_EX_PARAMETERS
struct _GET_LENGTH_INFORMATION * PGET_LENGTH_INFORMATION
struct _FORMAT_EX_PARAMETERS * PFORMAT_EX_PARAMETERS
struct _GET_PARTITION_ATTRIBUTES * PGET_PARTITION_ATTRIBUTES
struct _GET_PARTITION_ATTRIBUTES GET_PARTITION_ATTRIBUTES
struct _DISK_CACHE_SETTING * PDISK_CACHE_SETTING
_DISK_CACHE_STATE
Definition: ntdddisk.h:828
@ DiskCacheModifyUnsuccessful
Definition: ntdddisk.h:831
@ DiskCacheWriteThroughNotSupported
Definition: ntdddisk.h:830
@ DiskCacheNormal
Definition: ntdddisk.h:829
struct _DISK_PERFORMANCE_PARAMETERS * PDISK_PERFORMANCE_PARAMETERS
_DISK_PERFORMANCE_TYPE
Definition: ntdddisk.h:939
@ DiskPerformanceTypeMax
Definition: ntdddisk.h:942
@ DiskPerformanceTypeNonLowPriority
Definition: ntdddisk.h:941
@ DiskPerformanceTypeAllPriority
Definition: ntdddisk.h:940
struct _SET_PARTITION_ATTRIBUTES * PSET_PARTITION_ATTRIBUTES
struct _GET_LENGTH_INFORMATION GET_LENGTH_INFORMATION
USHORT * PBAD_TRACK_NUMBER
Definition: ntdddisk.h:373
struct _IDEREGS * PIDEREGS
enum _DISK_CACHE_STATE DISK_CACHE_STATE
enum _DISK_SNAPSHOT_STATE DISK_SNAPSHOT_STATE
struct _DRIVERSTATUS DRIVERSTATUS
struct _FORMAT_PARAMETERS FORMAT_PARAMETERS
struct _SENDCMDOUTPARAMS * LPSENDCMDOUTPARAMS
struct _DRIVERSTATUS * LPDRIVERSTATUS
struct _IDEREGS IDEREGS
struct _FORMAT_PARAMETERS * PFORMAT_PARAMETERS
struct _DISK_CONTROLLER_NUMBER DISK_CONTROLLER_NUMBER
struct _DISK_SAN_SETTINGS DISK_SAN_SETTINGS
enum _DISK_SNAPSHOT_STATE * PDISK_SNAPSHOT_STATE
struct _DISK_SAN_SETTINGS * PDISK_SAN_SETTINGS
struct _SENDCMDINPARAMS SENDCMDINPARAMS
struct _DISK_CLUSTER_INFO DISK_CLUSTER_INFO
struct _DISK_PERFORMANCE_PARAMETERS DISK_PERFORMANCE_PARAMETERS
struct _DISK_PERFORMANCE * PDISK_PERFORMANCE
struct _SET_PARTITION_ATTRIBUTES SET_PARTITION_ATTRIBUTES
struct _DISK_GEOMETRY DISK_GEOMETRY
enum _DISK_CACHE_STATE * PDISK_CACHE_STATE
struct _DISK_COPY_DATA_PARAMETERS DISK_COPY_DATA_PARAMETERS
struct _GET_DISK_ATTRIBUTES * PGET_DISK_ATTRIBUTES
struct _REASSIGN_BLOCKS * PREASSIGN_BLOCKS
struct _PARTITION_INFORMATION PARTITION_INFORMATION
enum _MEDIA_TYPE MEDIA_TYPE
struct _GETVERSIONINPARAMS GETVERSIONINPARAMS
struct _SENDCMDOUTPARAMS * PSENDCMDOUTPARAMS
struct _MAPPED_ADDRESS * PMAPPED_ADDRESS
struct _SENDCMDOUTPARAMS SENDCMDOUTPARAMS
_MEDIA_TYPE
Definition: ntdddisk.h:375
@ F3_120M_512
Definition: ntdddisk.h:389
@ F3_1Pt44_512
Definition: ntdddisk.h:378
@ F5_180_512
Definition: ntdddisk.h:385
@ RemovableMedia
Definition: ntdddisk.h:387
@ F5_1Pt23_1024
Definition: ntdddisk.h:395
@ FixedMedia
Definition: ntdddisk.h:388
@ F3_200Mb_512
Definition: ntdddisk.h:399
@ F3_1Pt23_1024
Definition: ntdddisk.h:394
@ F3_720_512
Definition: ntdddisk.h:381
@ Unknown
Definition: ntdddisk.h:376
@ F3_240M_512
Definition: ntdddisk.h:400
@ F3_1Pt2_512
Definition: ntdddisk.h:393
@ F5_360_512
Definition: ntdddisk.h:382
@ F3_640_512
Definition: ntdddisk.h:390
@ F3_32M_512
Definition: ntdddisk.h:401
@ F5_160_512
Definition: ntdddisk.h:386
@ F5_320_1024
Definition: ntdddisk.h:384
@ F5_320_512
Definition: ntdddisk.h:383
@ F3_20Pt8_512
Definition: ntdddisk.h:380
@ F8_256_128
Definition: ntdddisk.h:398
@ F5_1Pt2_512
Definition: ntdddisk.h:377
@ F5_720_512
Definition: ntdddisk.h:392
@ F5_640_512
Definition: ntdddisk.h:391
@ F3_2Pt88_512
Definition: ntdddisk.h:379
@ F3_128Mb_512
Definition: ntdddisk.h:396
@ F3_230Mb_512
Definition: ntdddisk.h:397
enum _MEDIA_TYPE * PMEDIA_TYPE
struct _SET_DISK_ATTRIBUTES SET_DISK_ATTRIBUTES
struct _DISK_CONTROLLER_NUMBER * PDISK_CONTROLLER_NUMBER
struct _SENDCMDINPARAMS * LPSENDCMDINPARAMS
enum _DISK_SAN_POLICY * PDISK_SAN_POLICY
struct _SET_PARTITION_INFORMATION * PSET_PARTITION_INFORMATION
struct _DISK_SNAPSHOT_INFO DISK_SNAPSHOT_INFO
enum _DISK_SAN_POLICY DISK_SAN_POLICY
struct _VERIFY_INFORMATION * PVERIFY_INFORMATION
enum _DISK_PERFORMANCE_TYPE * PDISK_PERFORMANCE_TYPE
struct _DISK_SNAPSHOT_INFO * PDISK_SNAPSHOT_INFO
struct _PARTITION_INFORMATION * PPARTITION_INFORMATION
struct _REASSIGN_BLOCKS REASSIGN_BLOCKS
USHORT BAD_TRACK_NUMBER
Definition: ntdddisk.h:372
struct _DISK_PERFORMANCE DISK_PERFORMANCE
struct _DRIVE_LAYOUT_INFORMATION DRIVE_LAYOUT_INFORMATION
struct _DISK_CLUSTER_INFO * PDISK_CLUSTER_INFO
struct _SET_DISK_ATTRIBUTES * PSET_DISK_ATTRIBUTES
struct _GETVERSIONINPARAMS * PGETVERSIONINPARAMS
struct _GET_DISK_ATTRIBUTES GET_DISK_ATTRIBUTES
struct _DISK_COPY_DATA_PARAMETERS * PDISK_COPY_DATA_PARAMETERS
struct _DISK_CACHE_SETTING DISK_CACHE_SETTING
struct _DISK_PERFORMANCE_INFO * PDISK_PERFORMANCE_INFO
struct _REASSIGN_BLOCKS_EX REASSIGN_BLOCKS_EX
struct _SET_PARTITION_INFORMATION SET_PARTITION_INFORMATION
struct _DISK_PERFORMANCE_INFO DISK_PERFORMANCE_INFO
enum _DISK_PERFORMANCE_TYPE DISK_PERFORMANCE_TYPE
_DISK_SNAPSHOT_STATE
Definition: ntdddisk.h:900
@ DiskSnapshotSnapshotDisk
Definition: ntdddisk.h:904
@ DiskSnapshotNormalDisk
Definition: ntdddisk.h:901
@ DiskSnapshotPreSnapshot
Definition: ntdddisk.h:903
@ DiskSnapshotSnapshotCheckRequired
Definition: ntdddisk.h:902
struct _IDEREGS * LPIDEREGS
_DISK_SAN_POLICY
Definition: ntdddisk.h:885
@ DiskSanPolicyOfflineInternal
Definition: ntdddisk.h:890
@ DiskSanPolicyOnline
Definition: ntdddisk.h:887
@ DiskSanPolicyOffline
Definition: ntdddisk.h:889
@ DiskSanPolicyMax
Definition: ntdddisk.h:891
@ DiskSanPolicyOfflineShared
Definition: ntdddisk.h:888
@ DiskSanPolicyUnknown
Definition: ntdddisk.h:886
struct _REASSIGN_BLOCKS_EX * PREASSIGN_BLOCKS_EX
struct _DISK_GEOMETRY * PDISK_GEOMETRY
struct _MAPPED_ADDRESS MAPPED_ADDRESS
struct _SENDCMDINPARAMS * PSENDCMDINPARAMS
struct _VERIFY_INFORMATION VERIFY_INFORMATION
unsigned short USHORT
Definition: pedump.c:61
DISK_CACHE_RETENTION_PRIORITY
Definition: winioctl.h:483
@ KeepReadData
Definition: winioctl.h:486
@ EqualPriority
Definition: winioctl.h:484
@ KeepPrefetchedData
Definition: winioctl.h:485
struct _DISK_CACHE_INFORMATION DISK_CACHE_INFORMATION
struct _DISK_CACHE_INFORMATION * PDISK_CACHE_INFORMATION
struct _DISK_GROW_PARTITION * PDISK_GROW_PARTITION
struct _DISK_GROW_PARTITION DISK_GROW_PARTITION
struct _DISK_GEOMETRY_EX * PDISK_GEOMETRY_EX
enum _MEDIA_TYPE MEDIA_TYPE
struct _DISK_GEOMETRY_EX DISK_GEOMETRY_EX
struct _DISK_CACHE_INFORMATION::@3329::@3332 BlockPrefetch
DISK_CACHE_RETENTION_PRIORITY ReadRetentionPriority
Definition: winioctl.h:492
WORD DisablePrefetchTransferLength
Definition: winioctl.h:494
struct _DISK_CACHE_INFORMATION::@3329::@3331 ScalarPrefetch
DISK_CACHE_RETENTION_PRIORITY WriteRetentionPriority
Definition: winioctl.h:493
DISK_CACHE_STATE State
Definition: ntdddisk.h:836
BOOLEAN IsPowerProtected
Definition: ntdddisk.h:837
ULONGLONG FlagsMask
Definition: ntdddisk.h:933
ULONGLONG Flags
Definition: ntdddisk.h:932
LARGE_INTEGER SourceOffset
Definition: ntdddisk.h:820
LARGE_INTEGER CopyLength
Definition: ntdddisk.h:822
LARGE_INTEGER DestinationOffset
Definition: ntdddisk.h:821
DISK_GEOMETRY Geometry
Definition: winioctl.h:330
LARGE_INTEGER DiskSize
Definition: winioctl.h:331
MEDIA_TYPE MediaType
Definition: ntdddisk.h:406
LARGE_INTEGER Cylinders
Definition: ntdddisk.h:405
ULONG TracksPerCylinder
Definition: ntdddisk.h:407
ULONG SectorsPerTrack
Definition: ntdddisk.h:408
ULONG BytesPerSector
Definition: ntdddisk.h:409
LARGE_INTEGER BytesToGrow
Definition: winioctl.h:481
LARGE_INTEGER FlushTime
Definition: ntdddisk.h:958
LARGE_INTEGER QueryTime
Definition: ntdddisk.h:953
LARGE_INTEGER ReadTime
Definition: ntdddisk.h:956
LARGE_INTEGER BytesWritten
Definition: ntdddisk.h:955
LARGE_INTEGER BytesRead
Definition: ntdddisk.h:954
LARGE_INTEGER IdleTime
Definition: ntdddisk.h:959
LARGE_INTEGER WriteTime
Definition: ntdddisk.h:957
DISK_PERFORMANCE_TYPE Type
Definition: ntdddisk.h:952
DISK_PERFORMANCE_TYPE Type
Definition: ntdddisk.h:947
LARGE_INTEGER ReadTime
Definition: ntdddisk.h:608
LARGE_INTEGER BytesWritten
Definition: ntdddisk.h:607
WCHAR StorageManagerName[8]
Definition: ntdddisk.h:617
LARGE_INTEGER QueryTime
Definition: ntdddisk.h:615
ULONG StorageDeviceNumber
Definition: ntdddisk.h:616
LARGE_INTEGER WriteTime
Definition: ntdddisk.h:609
LARGE_INTEGER IdleTime
Definition: ntdddisk.h:610
LARGE_INTEGER BytesRead
Definition: ntdddisk.h:606
DISK_SAN_POLICY SanPolicy
Definition: ntdddisk.h:896
LARGE_INTEGER CreationTimeStamp
Definition: ntdddisk.h:913
DISK_SNAPSHOT_STATE State
Definition: ntdddisk.h:909
ULONG AdditionalDataSize
Definition: ntdddisk.h:916
UCHAR AdditionalData[ANYSIZE_ARRAY]
Definition: ntdddisk.h:917
UCHAR bIDEError
Definition: helper.h:3
UCHAR bDriverError
Definition: helper.h:2
UCHAR bReserved[2]
Definition: helper.h:4
PARTITION_INFORMATION PartitionEntry[1]
Definition: ntdddisk.h:426
MEDIA_TYPE MediaType
Definition: ntdddisk.h:621
USHORT SectorNumber[1]
Definition: ntdddisk.h:628
MEDIA_TYPE MediaType
Definition: ntdddisk.h:632
ULONG EndCylinderNumber
Definition: ntdddisk.h:634
ULONG StartHeadNumber
Definition: ntdddisk.h:635
ULONG StartCylinderNumber
Definition: ntdddisk.h:633
ULONGLONG Attributes
Definition: ntdddisk.h:869
LARGE_INTEGER Length
Definition: imports.h:232
Definition: helper.h:8
UCHAR bDriveHeadReg
Definition: helper.h:14
UCHAR bReserved
Definition: helper.h:16
UCHAR bCylHighReg
Definition: helper.h:13
UCHAR bSectorNumberReg
Definition: helper.h:11
UCHAR bCylLowReg
Definition: helper.h:12
UCHAR bSectorCountReg
Definition: helper.h:10
UCHAR bFeaturesReg
Definition: helper.h:9
UCHAR bCommandReg
Definition: helper.h:15
ULONG BusNumber
Definition: ntdddisk.h:761
struct _MAPPED_ADDRESS * NextMappedAddress
Definition: ntdddisk.h:757
LARGE_INTEGER IoAddress
Definition: ntdddisk.h:760
PVOID MappedAddress
Definition: ntdddisk.h:758
ULONG NumberOfBytes
Definition: ntdddisk.h:759
LARGE_INTEGER StartingOffset
Definition: imports.h:221
PARTITION_STYLE PartitionStyle
Definition: imports.h:220
PARTITION_INFORMATION_MBR Mbr
Definition: imports.h:226
PARTITION_INFORMATION_GPT Gpt
Definition: imports.h:227
LARGE_INTEGER PartitionLength
Definition: imports.h:222
LARGE_INTEGER StartingOffset
Definition: ntdddisk.h:413
LARGE_INTEGER PartitionLength
Definition: ntdddisk.h:414
BOOLEAN RecognizedPartition
Definition: ntdddisk.h:419
BOOLEAN RewritePartition
Definition: ntdddisk.h:420
LARGE_INTEGER BlockNumber[1]
Definition: ntdddisk.h:652
ULONG BlockNumber[1]
Definition: ntdddisk.h:646
USHORT Reserved
Definition: ntdddisk.h:644
UCHAR bDriveNumber
Definition: helper.h:33
ULONG cBufferSize
Definition: helper.h:31
IDEREGS irDriveRegs
Definition: helper.h:32
UCHAR bBuffer[1]
Definition: helper.h:36
UCHAR bReserved[3]
Definition: helper.h:34
UCHAR bBuffer[1]
Definition: helper.h:27
ULONG cBufferSize
Definition: helper.h:25
DRIVERSTATUS DriverStatus
Definition: helper.h:26
BOOLEAN RelinquishOwnership
Definition: ntdddisk.h:875
ULONGLONG AttributesMask
Definition: ntdddisk.h:878
BOOLEAN Reserved1[2]
Definition: ntdddisk.h:876
ULONGLONG Attributes
Definition: ntdddisk.h:877
LARGE_INTEGER StartingOffset
Definition: ntdddisk.h:656
#define ANYSIZE_ARRAY
Definition: typedefs.h:46
uint32_t ULONG
Definition: typedefs.h:59
uint64_t ULONGLONG
Definition: typedefs.h:67
_In_ ULONG _In_ ULONG SectorsPerTrack
Definition: iofuncs.h:2071
unsigned char UCHAR
Definition: xmlstorage.h:181
__wchar_t WCHAR
Definition: xmlstorage.h:180