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 38 extern "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 299 #ifdef __REACTOS__ 300 #define PARTITION_OLD_LINUX 0x43 301 #define PARTITION_LINUX 0x83 302 #define PARTITION_ISO9660 0x96 303 #define PARTITION_FREEBSD 0xA5 304 #define PARTITION_OPENBSD 0xA6 305 #define PARTITION_NETBSD 0xA9 306 #endif 307 308 /* 309 * NOTE: Support for partition types removed from IsFTPartition() and 310 * IsRecognizedPartition() because they conflict with 3rd-party types: 311 * PARTITION_NTFT | PARTITION_FAT_12 : Conflict with 0x81 "Linux or MINIX" 312 * PARTITION_NTFT | PARTITION_FAT_16 : Conflict with 0x84 "Hibernation" 313 * PARTITION_NTFT | PARTITION_XINT13 : Conflict with 0x8E "Linux LVM" 314 */ 315 #define IsFTPartition(PartitionType) \ 316 ( ((PartitionType) & PARTITION_NTFT) && ((((PartitionType) & ~VALID_NTFT) == PARTITION_HUGE) || \ 317 (((PartitionType) & ~VALID_NTFT) == PARTITION_IFS) || \ 318 (((PartitionType) & ~VALID_NTFT) == PARTITION_FAT32) || \ 319 (((PartitionType) & ~VALID_NTFT) == PARTITION_FAT32_XINT13)) ) 320 321 #define IsContainerPartition(PartitionType) \ 322 ( ((PartitionType) == PARTITION_EXTENDED) || \ 323 ((PartitionType) == PARTITION_XINT13_EXTENDED) ) 324 325 #ifdef __REACTOS__ 326 #define IsRecognizedPartition(PartitionType) \ 327 ( IsFTPartition(PartitionType) || \ 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 ( IsFTPartition(PartitionType) || \ 344 ((PartitionType) == PARTITION_FAT_12) || \ 345 ((PartitionType) == PARTITION_FAT_16) || \ 346 ((PartitionType) == PARTITION_HUGE) || \ 347 ((PartitionType) == PARTITION_IFS) || \ 348 ((PartitionType) == PARTITION_FAT32) || \ 349 ((PartitionType) == PARTITION_FAT32_XINT13) || \ 350 ((PartitionType) == PARTITION_XINT13) ) 351 #endif 352 353 #if (_WIN32_WINNT >= 0x0500) 354 /* Actually it should be > 0x0500, since this is not present in Windows 2000; 355 * however we keep >= 0x0500 for compatibility with MS PSDK. */ 356 357 #define GPT_ATTRIBUTE_PLATFORM_REQUIRED 0x00000001 358 #define GPT_BASIC_DATA_ATTRIBUTE_READ_ONLY 0x10000000 359 #define GPT_BASIC_DATA_ATTRIBUTE_SHADOW_COPY 0x20000000 360 #define GPT_BASIC_DATA_ATTRIBUTE_HIDDEN 0x40000000 361 #define GPT_BASIC_DATA_ATTRIBUTE_NO_DRIVE_LETTER 0x80000000 362 #endif 363 364 #define WMI_DISK_GEOMETRY_GUID \ 365 {0x25007f51, 0x57c2, 0x11d1, {0xa5, 0x28, 0x0, 0xa0, 0xc9, 0x6, 0x29, 0x10}} 366 367 typedef USHORT BAD_TRACK_NUMBER; 368 typedef USHORT *PBAD_TRACK_NUMBER; 369 370 typedef enum _MEDIA_TYPE { 371 Unknown, 372 F5_1Pt2_512, 373 F3_1Pt44_512, 374 F3_2Pt88_512, 375 F3_20Pt8_512, 376 F3_720_512, 377 F5_360_512, 378 F5_320_512, 379 F5_320_1024, 380 F5_180_512, 381 F5_160_512, 382 RemovableMedia, 383 FixedMedia, 384 F3_120M_512, 385 F3_640_512, 386 F5_640_512, 387 F5_720_512, 388 F3_1Pt2_512, 389 F3_1Pt23_1024, 390 F5_1Pt23_1024, 391 F3_128Mb_512, 392 F3_230Mb_512, 393 F8_256_128, 394 F3_200Mb_512, 395 F3_240M_512, 396 F3_32M_512 397 } MEDIA_TYPE, *PMEDIA_TYPE; 398 399 typedef struct _DISK_GEOMETRY { 400 LARGE_INTEGER Cylinders; 401 MEDIA_TYPE MediaType; 402 ULONG TracksPerCylinder; 403 ULONG SectorsPerTrack; 404 ULONG BytesPerSector; 405 } DISK_GEOMETRY, *PDISK_GEOMETRY; 406 407 typedef struct _PARTITION_INFORMATION { 408 LARGE_INTEGER StartingOffset; 409 LARGE_INTEGER PartitionLength; 410 ULONG HiddenSectors; 411 ULONG PartitionNumber; 412 UCHAR PartitionType; 413 BOOLEAN BootIndicator; 414 BOOLEAN RecognizedPartition; 415 BOOLEAN RewritePartition; 416 } PARTITION_INFORMATION, *PPARTITION_INFORMATION; 417 418 typedef struct _DRIVE_LAYOUT_INFORMATION { 419 ULONG PartitionCount; 420 ULONG Signature; 421 PARTITION_INFORMATION PartitionEntry[1]; 422 } DRIVE_LAYOUT_INFORMATION, *PDRIVE_LAYOUT_INFORMATION; 423 424 typedef struct _SET_PARTITION_INFORMATION { 425 UCHAR PartitionType; 426 } SET_PARTITION_INFORMATION, *PSET_PARTITION_INFORMATION; 427 428 #if (_WIN32_WINNT >= 0x0500) 429 /* Actually it should be > 0x0500, since this is not present in Windows 2000; 430 * however we keep >= 0x0500 for compatibility with MS PSDK. */ 431 432 typedef enum _PARTITION_STYLE { 433 PARTITION_STYLE_MBR, 434 PARTITION_STYLE_GPT, 435 PARTITION_STYLE_RAW, 436 #ifdef __REACTOS__ 437 /* ReactOS custom partition handlers */ 438 PARTITION_STYLE_BRFR = 128 /* Xbox-BRFR partitioning scheme */ 439 #endif 440 } PARTITION_STYLE; 441 442 typedef struct _CREATE_DISK_GPT 443 { 444 GUID DiskId; 445 ULONG MaxPartitionCount; 446 } CREATE_DISK_GPT, *PCREATE_DISK_GPT; 447 448 typedef struct _CREATE_DISK_MBR 449 { 450 ULONG Signature; 451 } CREATE_DISK_MBR, *PCREATE_DISK_MBR; 452 453 typedef struct _CREATE_DISK 454 { 455 PARTITION_STYLE PartitionStyle; 456 union { 457 CREATE_DISK_MBR Mbr; 458 CREATE_DISK_GPT Gpt; 459 }; 460 } CREATE_DISK, *PCREATE_DISK; 461 462 typedef enum _DETECTION_TYPE { 463 DetectNone, 464 DetectInt13, 465 DetectExInt13 466 } DETECTION_TYPE; 467 468 typedef struct _DISK_INT13_INFO { 469 USHORT DriveSelect; 470 ULONG MaxCylinders; 471 USHORT SectorsPerTrack; 472 USHORT MaxHeads; 473 USHORT NumberDrives; 474 } DISK_INT13_INFO, *PDISK_INT13_INFO; 475 476 typedef struct _DISK_EX_INT13_INFO { 477 USHORT ExBufferSize; 478 USHORT ExFlags; 479 ULONG ExCylinders; 480 ULONG ExHeads; 481 ULONG ExSectorsPerTrack; 482 ULONG64 ExSectorsPerDrive; 483 USHORT ExSectorSize; 484 USHORT ExReserved; 485 } DISK_EX_INT13_INFO, *PDISK_EX_INT13_INFO; 486 487 typedef struct _DISK_DETECTION_INFO { 488 ULONG SizeOfDetectInfo; 489 DETECTION_TYPE DetectionType; 490 _ANONYMOUS_UNION union { 491 _ANONYMOUS_STRUCT struct { 492 DISK_INT13_INFO Int13; 493 DISK_EX_INT13_INFO ExInt13; 494 } DUMMYSTRUCTNAME; 495 } DUMMYUNIONNAME; 496 } DISK_DETECTION_INFO, *PDISK_DETECTION_INFO; 497 498 typedef struct _DISK_PARTITION_INFO { 499 ULONG SizeOfPartitionInfo; 500 PARTITION_STYLE PartitionStyle; 501 _ANONYMOUS_UNION union { 502 struct { 503 ULONG Signature; 504 ULONG CheckSum; 505 } Mbr; 506 struct { 507 GUID DiskId; 508 } Gpt; 509 } DUMMYUNIONNAME; 510 } DISK_PARTITION_INFO, *PDISK_PARTITION_INFO; 511 512 typedef struct _DISK_GEOMETRY_EX { 513 DISK_GEOMETRY Geometry; 514 LARGE_INTEGER DiskSize; 515 UCHAR Data[1]; 516 } DISK_GEOMETRY_EX, *PDISK_GEOMETRY_EX; 517 518 #if (NTDDI_VERSION < NTDDI_WS03) 519 #define DiskGeometryGetPartition(Geometry) \ 520 ((PDISK_PARTITION_INFO)((Geometry) + 1)) 521 522 #define DiskGeometryGetDetect(Geometry)\ 523 ((PDISK_DETECTION_INFO)(((PBYTE)DiskGeometryGetPartition(Geometry) + \ 524 DiskGeometryGetPartition(Geometry)->SizeOfPartitionInfo))) 525 #else 526 #define DiskGeometryGetPartition(Geometry) \ 527 ((PDISK_PARTITION_INFO)((Geometry)->Data)) 528 529 #define DiskGeometryGetDetect(Geometry)\ 530 ((PDISK_DETECTION_INFO)(((ULONG_PTR)DiskGeometryGetPartition(Geometry) + \ 531 DiskGeometryGetPartition(Geometry)->SizeOfPartitionInfo))) 532 #endif 533 534 typedef struct _PARTITION_INFORMATION_GPT { 535 GUID PartitionType; 536 GUID PartitionId; 537 ULONG64 Attributes; 538 WCHAR Name [36]; 539 } PARTITION_INFORMATION_GPT, *PPARTITION_INFORMATION_GPT; 540 541 typedef struct _PARTITION_INFORMATION_MBR { 542 UCHAR PartitionType; 543 BOOLEAN BootIndicator; 544 BOOLEAN RecognizedPartition; 545 ULONG HiddenSectors; 546 } PARTITION_INFORMATION_MBR, *PPARTITION_INFORMATION_MBR; 547 548 typedef struct _PARTITION_INFORMATION_EX { 549 PARTITION_STYLE PartitionStyle; 550 LARGE_INTEGER StartingOffset; 551 LARGE_INTEGER PartitionLength; 552 ULONG PartitionNumber; 553 BOOLEAN RewritePartition; 554 #if (NTDDI_VERSION >= NTDDI_WIN10_RS3) 555 BOOLEAN IsServicePartition; 556 #endif 557 _ANONYMOUS_UNION union { 558 PARTITION_INFORMATION_MBR Mbr; 559 PARTITION_INFORMATION_GPT Gpt; 560 } DUMMYUNIONNAME; 561 } PARTITION_INFORMATION_EX, *PPARTITION_INFORMATION_EX; 562 563 typedef struct _DRIVE_LAYOUT_INFORMATION_GPT { 564 GUID DiskId; 565 LARGE_INTEGER StartingUsableOffset; 566 LARGE_INTEGER UsableLength; 567 ULONG MaxPartitionCount; 568 } DRIVE_LAYOUT_INFORMATION_GPT, *PDRIVE_LAYOUT_INFORMATION_GPT; 569 570 typedef struct _DRIVE_LAYOUT_INFORMATION_MBR { 571 ULONG Signature; 572 #if (NTDDI_VERSION >= NTDDI_WIN10_RS1) 573 ULONG CheckSum; 574 #endif 575 } DRIVE_LAYOUT_INFORMATION_MBR, *PDRIVE_LAYOUT_INFORMATION_MBR; 576 577 typedef struct _DRIVE_LAYOUT_INFORMATION_EX { 578 ULONG PartitionStyle; 579 ULONG PartitionCount; 580 __GNU_EXTENSION union { 581 DRIVE_LAYOUT_INFORMATION_MBR Mbr; 582 DRIVE_LAYOUT_INFORMATION_GPT Gpt; 583 }; 584 PARTITION_INFORMATION_EX PartitionEntry[1]; 585 } DRIVE_LAYOUT_INFORMATION_EX, *PDRIVE_LAYOUT_INFORMATION_EX; 586 587 typedef SET_PARTITION_INFORMATION SET_PARTITION_INFORMATION_MBR; 588 typedef PARTITION_INFORMATION_GPT SET_PARTITION_INFORMATION_GPT; 589 590 typedef struct _SET_PARTITION_INFORMATION_EX { 591 PARTITION_STYLE PartitionStyle; 592 _ANONYMOUS_UNION union { 593 SET_PARTITION_INFORMATION_MBR Mbr; 594 SET_PARTITION_INFORMATION_GPT Gpt; 595 } DUMMYUNIONNAME; 596 } SET_PARTITION_INFORMATION_EX, *PSET_PARTITION_INFORMATION_EX; 597 598 #endif // (_WIN32_WINNT >= 0x0500) 599 600 typedef struct _DISK_PERFORMANCE { 601 LARGE_INTEGER BytesRead; 602 LARGE_INTEGER BytesWritten; 603 LARGE_INTEGER ReadTime; 604 LARGE_INTEGER WriteTime; 605 LARGE_INTEGER IdleTime; 606 ULONG ReadCount; 607 ULONG WriteCount; 608 ULONG QueueDepth; 609 ULONG SplitCount; 610 LARGE_INTEGER QueryTime; 611 ULONG StorageDeviceNumber; 612 WCHAR StorageManagerName[8]; 613 } DISK_PERFORMANCE, *PDISK_PERFORMANCE; 614 615 typedef struct _FORMAT_EX_PARAMETERS { 616 MEDIA_TYPE MediaType; 617 ULONG StartCylinderNumber; 618 ULONG EndCylinderNumber; 619 ULONG StartHeadNumber; 620 ULONG EndHeadNumber; 621 USHORT FormatGapLength; 622 USHORT SectorsPerTrack; 623 USHORT SectorNumber[1]; 624 } FORMAT_EX_PARAMETERS, *PFORMAT_EX_PARAMETERS; 625 626 typedef struct _FORMAT_PARAMETERS { 627 MEDIA_TYPE MediaType; 628 ULONG StartCylinderNumber; 629 ULONG EndCylinderNumber; 630 ULONG StartHeadNumber; 631 ULONG EndHeadNumber; 632 } FORMAT_PARAMETERS, *PFORMAT_PARAMETERS; 633 634 typedef struct _GET_LENGTH_INFORMATION { 635 LARGE_INTEGER Length; 636 } GET_LENGTH_INFORMATION, *PGET_LENGTH_INFORMATION; 637 638 typedef struct _REASSIGN_BLOCKS { 639 USHORT Reserved; 640 USHORT Count; 641 ULONG BlockNumber[1]; 642 } REASSIGN_BLOCKS, *PREASSIGN_BLOCKS; 643 644 typedef struct _REASSIGN_BLOCKS_EX { 645 USHORT Reserved; 646 USHORT Count; 647 LARGE_INTEGER BlockNumber[1]; 648 } REASSIGN_BLOCKS_EX, *PREASSIGN_BLOCKS_EX; 649 650 typedef struct _VERIFY_INFORMATION { 651 LARGE_INTEGER StartingOffset; 652 ULONG Length; 653 } VERIFY_INFORMATION, *PVERIFY_INFORMATION; 654 655 /* GETVERSIONINPARAMS.fCapabilities constants */ 656 #define CAP_ATA_ID_CMD 1 657 #define CAP_ATAPI_ID_CMD 2 658 #define CAP_SMART_CMD 4 659 660 typedef struct _GETVERSIONINPARAMS { 661 UCHAR bVersion; 662 UCHAR bRevision; 663 UCHAR bReserved; 664 UCHAR bIDEDeviceMap; 665 ULONG fCapabilities; 666 ULONG dwReserved[4]; 667 } GETVERSIONINPARAMS, *PGETVERSIONINPARAMS, *LPGETVERSIONINPARAMS; 668 669 /* IDEREGS.bCommandReg constants */ 670 #define ATAPI_ID_CMD 0xA1 671 #define ID_CMD 0xEC 672 #define SMART_CMD 0xB0 673 674 #define SMART_CYL_LOW 0x4F 675 #define SMART_CYL_HI 0xC2 676 677 typedef struct _IDEREGS { 678 UCHAR bFeaturesReg; 679 UCHAR bSectorCountReg; 680 UCHAR bSectorNumberReg; 681 UCHAR bCylLowReg; 682 UCHAR bCylHighReg; 683 UCHAR bDriveHeadReg; 684 UCHAR bCommandReg; 685 UCHAR bReserved; 686 } IDEREGS, *PIDEREGS, *LPIDEREGS; 687 688 #include <pshpack1.h> 689 typedef struct _SENDCMDINPARAMS { 690 ULONG cBufferSize; 691 IDEREGS irDriveRegs; 692 UCHAR bDriveNumber; 693 UCHAR bReserved[3]; 694 ULONG dwReserved[4]; 695 UCHAR bBuffer[1]; 696 } SENDCMDINPARAMS, *PSENDCMDINPARAMS, *LPSENDCMDINPARAMS; 697 #include <poppack.h> 698 699 /* DRIVERSTATUS.bDriverError constants */ 700 #define SMART_NO_ERROR 0 701 #define SMART_IDE_ERROR 1 702 #define SMART_INVALID_FLAG 2 703 #define SMART_INVALID_COMMAND 3 704 #define SMART_INVALID_BUFFER 4 705 #define SMART_INVALID_DRIVE 5 706 #define SMART_INVALID_IOCTL 6 707 #define SMART_ERROR_NO_MEM 7 708 #define SMART_INVALID_REGISTER 8 709 #define SMART_NOT_SUPPORTED 9 710 #define SMART_NO_IDE_DEVICE 10 711 712 #define SMART_OFFLINE_ROUTINE_OFFLINE 0 713 #define SMART_SHORT_SELFTEST_OFFLINE 1 714 #define SMART_EXTENDED_SELFTEST_OFFLINE 2 715 #define SMART_ABORT_OFFLINE_SELFTEST 127 716 #define SMART_SHORT_SELFTEST_CAPTIVE 129 717 #define SMART_EXTENDED_SELFTEST_CAPTIVE 130 718 719 typedef struct _DRIVERSTATUS { 720 UCHAR bDriverError; 721 UCHAR bIDEError; 722 UCHAR bReserved[2]; 723 ULONG dwReserved[2]; 724 } DRIVERSTATUS, *PDRIVERSTATUS, *LPDRIVERSTATUS; 725 726 #define READ_ATTRIBUTE_BUFFER_SIZE 512 727 #define IDENTIFY_BUFFER_SIZE 512 728 #define READ_THRESHOLD_BUFFER_SIZE 512 729 #define SMART_LOG_SECTOR_SIZE 512 730 731 #include <pshpack1.h> 732 typedef struct _SENDCMDOUTPARAMS { 733 ULONG cBufferSize; 734 DRIVERSTATUS DriverStatus; 735 UCHAR bBuffer[1]; 736 } SENDCMDOUTPARAMS, *PSENDCMDOUTPARAMS, *LPSENDCMDOUTPARAMS; 737 #include <poppack.h> 738 739 #define READ_ATTRIBUTES 0xD0 740 #define READ_THRESHOLDS 0xD1 741 #define ENABLE_DISABLE_AUTOSAVE 0xD2 742 #define SAVE_ATTRIBUTE_VALUES 0xD3 743 #define EXECUTE_OFFLINE_DIAGS 0xD4 744 #define SMART_READ_LOG 0xD5 745 #define SMART_WRITE_LOG 0xd6 746 #define ENABLE_SMART 0xD8 747 #define DISABLE_SMART 0xD9 748 #define RETURN_SMART_STATUS 0xDA 749 #define ENABLE_DISABLE_AUTO_OFFLINE 0xDB 750 751 typedef struct _MAPPED_ADDRESS { 752 struct _MAPPED_ADDRESS *NextMappedAddress; 753 PVOID MappedAddress; 754 ULONG NumberOfBytes; 755 LARGE_INTEGER IoAddress; 756 ULONG BusNumber; 757 } MAPPED_ADDRESS, *PMAPPED_ADDRESS; 758 759 760 #if (_WIN32_WINNT >= 0x0500) 761 762 typedef enum { 763 EqualPriority, 764 KeepPrefetchedData, 765 KeepReadData 766 } DISK_CACHE_RETENTION_PRIORITY; 767 768 typedef enum _DISK_WRITE_CACHE_STATE { 769 DiskWriteCacheNormal, 770 DiskWriteCacheForceDisable, 771 DiskWriteCacheDisableNotSupported 772 } DISK_WRITE_CACHE_STATE, *PDISK_WRITE_CACHE_STATE; 773 774 775 typedef struct _DISK_CACHE_INFORMATION 776 { 777 BOOLEAN ParametersSavable; 778 BOOLEAN ReadCacheEnabled; 779 BOOLEAN WriteCacheEnabled; 780 DISK_CACHE_RETENTION_PRIORITY ReadRetentionPriority; 781 DISK_CACHE_RETENTION_PRIORITY WriteRetentionPriority; 782 USHORT DisablePrefetchTransferLength; 783 BOOLEAN PrefetchScalar; 784 union { 785 struct { 786 USHORT Minimum; 787 USHORT Maximum; 788 USHORT MaximumBlocks; 789 } ScalarPrefetch; 790 791 struct { 792 USHORT Minimum; 793 USHORT Maximum; 794 } BlockPrefetch; 795 }; 796 797 } DISK_CACHE_INFORMATION, *PDISK_CACHE_INFORMATION; 798 799 typedef struct _DISK_GROW_PARTITION { 800 ULONG PartitionNumber; 801 LARGE_INTEGER BytesToGrow; 802 } DISK_GROW_PARTITION, *PDISK_GROW_PARTITION; 803 #endif 804 805 // for IOCTL_DISK_CONTROLLER_NUMBER 806 807 typedef struct _DISK_CONTROLLER_NUMBER { 808 ULONG ControllerNumber; 809 ULONG DiskNumber; 810 } DISK_CONTROLLER_NUMBER, *PDISK_CONTROLLER_NUMBER; 811 812 // for IOCTL_DISK_COPY_DATA 813 814 typedef struct _DISK_COPY_DATA_PARAMETERS { 815 LARGE_INTEGER SourceOffset; 816 LARGE_INTEGER DestinationOffset; 817 LARGE_INTEGER CopyLength; 818 ULONGLONG Reserved; 819 } DISK_COPY_DATA_PARAMETERS, *PDISK_COPY_DATA_PARAMETERS; 820 821 // for IOCTL_DISK_GET_CACHE_SETTING and IOCTL_DISK_SET_CACHE_SETTING 822 823 typedef enum _DISK_CACHE_STATE { 824 DiskCacheNormal, 825 DiskCacheWriteThroughNotSupported, 826 DiskCacheModifyUnsuccessful 827 } DISK_CACHE_STATE, *PDISK_CACHE_STATE; 828 829 typedef struct _DISK_CACHE_SETTING { 830 ULONG Version; 831 DISK_CACHE_STATE State; 832 BOOLEAN IsPowerProtected; 833 } DISK_CACHE_SETTING, *PDISK_CACHE_SETTING; 834 835 #if (NTDDI_VERSION >= NTDDI_VISTA) 836 837 // for IOCTL_DISK_GET_PARTITION_ATTRIBUTES and IOCTL_DISK_SET_PARTITION_ATTRIBUTES 838 839 typedef struct _GET_PARTITION_ATTRIBUTES { 840 ULONG Version; 841 ULONG Reserved1; 842 ULONGLONG Attributes; 843 } GET_PARTITION_ATTRIBUTES, *PGET_PARTITION_ATTRIBUTES; 844 845 typedef struct _SET_PARTITION_ATTRIBUTES { 846 ULONG Version; 847 BOOLEAN Persist; 848 BOOLEAN Reserved1[3]; 849 ULONGLONG Attributes; 850 ULONGLONG AttributesMask; 851 } SET_PARTITION_ATTRIBUTES, *PSET_PARTITION_ATTRIBUTES; 852 853 // for IOCTL_DISK_GET_DISK_ATTRIBUTES and IOCTL_DISK_SET_DISK_ATTRIBUTES 854 855 #define DISK_ATTRIBUTE_OFFLINE 0x0000000000000001 856 #define DISK_ATTRIBUTE_READ_ONLY 0x0000000000000002 857 #define DISK_ATTRIBUTE_HIDDEN 0x0000000000000004 858 #define DISK_ATTRIBUTE_MAINTENANCE 0x0000000000000008 859 #define DISK_ATTRIBUTE_SPACES_BYPASS 0x0000000000000010 860 861 typedef struct _GET_DISK_ATTRIBUTES { 862 ULONG Version; 863 ULONG Reserved1; 864 ULONGLONG Attributes; 865 } GET_DISK_ATTRIBUTES, *PGET_DISK_ATTRIBUTES; 866 867 typedef struct _SET_DISK_ATTRIBUTES { 868 ULONG Version; 869 BOOLEAN Persist; 870 BOOLEAN RelinquishOwnership; 871 BOOLEAN Reserved1[2]; 872 ULONGLONG Attributes; 873 ULONGLONG AttributesMask; 874 GUID Owner; 875 } SET_DISK_ATTRIBUTES, *PSET_DISK_ATTRIBUTES; 876 877 878 // for IOCTL_DISK_GET_SAN_SETTINGS and IOCTL_DISK_SET_SAN_SETTINGS 879 880 typedef enum _DISK_SAN_POLICY { 881 DiskSanPolicyUnknown, 882 DiskSanPolicyOnline, 883 DiskSanPolicyOfflineShared, 884 DiskSanPolicyOffline, 885 DiskSanPolicyOfflineInternal, 886 DiskSanPolicyMax 887 } DISK_SAN_POLICY, *PDISK_SAN_POLICY; 888 889 typedef struct _DISK_SAN_SETTINGS { 890 ULONG Version; 891 DISK_SAN_POLICY SanPolicy; 892 } DISK_SAN_SETTINGS, *PDISK_SAN_SETTINGS; 893 894 // for IOCTL_DISK_GET_SNAPSHOT_INFO and IOCTL_DISK_SET_SNAPSHOT_INFO 895 typedef enum _DISK_SNAPSHOT_STATE { 896 DiskSnapshotNormalDisk, 897 DiskSnapshotSnapshotCheckRequired, 898 DiskSnapshotPreSnapshot, 899 DiskSnapshotSnapshotDisk 900 } DISK_SNAPSHOT_STATE, *PDISK_SNAPSHOT_STATE; 901 902 typedef struct _DISK_SNAPSHOT_INFO { 903 ULONG Version; 904 DISK_SNAPSHOT_STATE State; 905 GUID SnapshotSetId; 906 GUID SnapshotId; 907 GUID LunId; 908 LARGE_INTEGER CreationTimeStamp; 909 ULONG ImportCount; 910 ULONG Flags; 911 ULONG AdditionalDataSize; 912 UCHAR AdditionalData[ANYSIZE_ARRAY]; 913 } DISK_SNAPSHOT_INFO, *PDISK_SNAPSHOT_INFO; 914 #endif /* NTDDI_VERSION >= NTDDI_VISTA */ 915 916 #if (NTDDI_VERSION >= NTDDI_WIN8) 917 918 // for IOCTL_DISK_GET_CLUSTER_INFO and IOCTL_DISK_SET_CLUSTER_INFO 919 920 #define DISK_CLUSTER_FLAG_ENABLED 0x0000000000000001 921 #define DISK_CLUSTER_FLAG_CSV 0x0000000000000002 922 #define DISK_CLUSTER_FLAG_IN_MAINTENANCE 0x0000000000000004 923 #define DISK_CLUSTER_FLAG_PNP_ARRIVAL_COMPLETE 0x0000000000000008 924 925 typedef struct _DISK_CLUSTER_INFO { 926 ULONG Version; 927 ULONGLONG Flags; 928 ULONGLONG FlagsMask; 929 BOOLEAN Notify; 930 } DISK_CLUSTER_INFO, *PDISK_CLUSTER_INFO; 931 932 // for IOCTL_DISK_GET_PERFORMANCE_INFO 933 934 typedef enum _DISK_PERFORMANCE_TYPE { 935 DiskPerformanceTypeAllPriority, 936 DiskPerformanceTypeNonLowPriority, 937 DiskPerformanceTypeMax 938 } DISK_PERFORMANCE_TYPE, *PDISK_PERFORMANCE_TYPE; 939 940 typedef struct _DISK_PERFORMANCE_PARAMETERS { 941 ULONG Version; 942 DISK_PERFORMANCE_TYPE Type; 943 } DISK_PERFORMANCE_PARAMETERS, *PDISK_PERFORMANCE_PARAMETERS; 944 945 typedef struct _DISK_PERFORMANCE_INFO { 946 ULONG Version; 947 DISK_PERFORMANCE_TYPE Type; 948 LARGE_INTEGER QueryTime; 949 LARGE_INTEGER BytesRead; 950 LARGE_INTEGER BytesWritten; 951 LARGE_INTEGER ReadTime; 952 LARGE_INTEGER WriteTime; 953 LARGE_INTEGER FlushTime; 954 LARGE_INTEGER IdleTime; 955 ULONG ReadCount; 956 ULONG WriteCount; 957 ULONG FlushCount; 958 ULONG QueueDepth; 959 ULONG SplitCount; 960 } DISK_PERFORMANCE_INFO, *PDISK_PERFORMANCE_INFO; 961 962 #endif /* NTDDI_VERSION >= NTDDI_WIN8 */ 963 964 965 #ifdef __cplusplus 966 } 967 #endif 968 969 #endif /* _NTDDDISK_H_ */ 970