1 /*++ BUILD Version: 0016      // Increment this if a change has global effects
2
3 Copyright (c) Microsoft Corporation. All rights reserved.
4
5 Module Name:
6
7       winioctl.h
8
9 Abstract:
10
11       This module defines the 32-Bit Windows Device I/O control codes.
12
13 Revision History:
14
15 --*/
16
17
18 //
19 // Device interface class GUIDs.
20 //
21 // need these GUIDs outside conditional includes so that user can
22 //     #include <winioctl.h> in precompiled header
23 //     #include <initguid.h> in a single source file
24 //     #include <winioctl.h> in that source file a second time to instantiate the GUIDs
25 //
26 #ifdef DEFINE_GUID
27 //
28 // Make sure FAR is defined...
29 //
30 #ifndef FAR
31 #ifdef _WIN32
32 #define FAR
33 #else
34 #define FAR _far
35 #endif
36 #endif
37
38 DEFINE_GUID(GUID_DEVINTERFACE_DISK,                               0x53f56307L, 0xb6bf, 0x11d0, 0x94, 0xf2, 0x00, 0xa0, 0xc9, 0x1e, 0xfb, 0x8b);
39 DEFINE_GUID(GUID_DEVINTERFACE_CDROM,                              0x53f56308L, 0xb6bf, 0x11d0, 0x94, 0xf2, 0x00, 0xa0, 0xc9, 0x1e, 0xfb, 0x8b);
40 DEFINE_GUID(GUID_DEVINTERFACE_PARTITION,                       0x53f5630aL, 0xb6bf, 0x11d0, 0x94, 0xf2, 0x00, 0xa0, 0xc9, 0x1e, 0xfb, 0x8b);
41 DEFINE_GUID(GUID_DEVINTERFACE_TAPE,                               0x53f5630bL, 0xb6bf, 0x11d0, 0x94, 0xf2, 0x00, 0xa0, 0xc9, 0x1e, 0xfb, 0x8b);
42 DEFINE_GUID(GUID_DEVINTERFACE_WRITEONCEDISK,                0x53f5630cL, 0xb6bf, 0x11d0, 0x94, 0xf2, 0x00, 0xa0, 0xc9, 0x1e, 0xfb, 0x8b);
43 DEFINE_GUID(GUID_DEVINTERFACE_VOLUME,                            0x53f5630dL, 0xb6bf, 0x11d0, 0x94, 0xf2, 0x00, 0xa0, 0xc9, 0x1e, 0xfb, 0x8b);
44 DEFINE_GUID(GUID_DEVINTERFACE_MEDIUMCHANGER,                0x53f56310L, 0xb6bf, 0x11d0, 0x94, 0xf2, 0x00, 0xa0, 0xc9, 0x1e, 0xfb, 0x8b);
45 DEFINE_GUID(GUID_DEVINTERFACE_FLOPPY,                            0x53f56311L, 0xb6bf, 0x11d0, 0x94, 0xf2, 0x00, 0xa0, 0xc9, 0x1e, 0xfb, 0x8b);
46 DEFINE_GUID(GUID_DEVINTERFACE_CDCHANGER,                       0x53f56312L, 0xb6bf, 0x11d0, 0x94, 0xf2, 0x00, 0xa0, 0xc9, 0x1e, 0xfb, 0x8b);
47 DEFINE_GUID(GUID_DEVINTERFACE_STORAGEPORT,                    0x2accfe60L, 0xc130, 0x11d2, 0xb0, 0x82, 0x00, 0xa0, 0xc9, 0x1e, 0xfb, 0x8b);
48
49 #define  WDI_STORAGE_PREDICT_FAILURE_DPS_GUID             {0xe9f2d03aL, 0x747c, 0x41c2, {0xbb, 0x9a, 0x02, 0xc6, 0x2b, 0x6d, 0x5f, 0xcb}};
50
51 DEFINE_GUID(GUID_DEVINTERFACE_COMPORT,                          0x86e0d1e0L, 0x8089, 0x11d0, 0x9c, 0xe4, 0x08, 0x00, 0x3e, 0x30, 0x1f, 0x73);
52 DEFINE_GUID(GUID_DEVINTERFACE_SERENUM_BUS_ENUMERATOR, 0x4D36E978L, 0xE325, 0x11CE, 0xBF, 0xC1, 0x08, 0x00, 0x2B, 0xE1, 0x03, 0x18);
53
54 //
55 // Obsolete device interface class GUID names.
56 // (use of above GUID_DEVINTERFACE_* names is recommended).
57 //
58 #define DiskClassGuid                         GUID_DEVINTERFACE_DISK
59 #define CdRomClassGuid                       GUID_DEVINTERFACE_CDROM
60 #define PartitionClassGuid                GUID_DEVINTERFACE_PARTITION
61 #define TapeClassGuid                         GUID_DEVINTERFACE_TAPE
62 #define WriteOnceDiskClassGuid          GUID_DEVINTERFACE_WRITEONCEDISK
63 #define VolumeClassGuid                     GUID_DEVINTERFACE_VOLUME
64 #define MediumChangerClassGuid          GUID_DEVINTERFACE_MEDIUMCHANGER
65 #define FloppyClassGuid                     GUID_DEVINTERFACE_FLOPPY
66 #define CdChangerClassGuid                GUID_DEVINTERFACE_CDCHANGER
67 #define StoragePortClassGuid             GUID_DEVINTERFACE_STORAGEPORT
68 #define GUID_CLASS_COMPORT                GUID_DEVINTERFACE_COMPORT
69 #define GUID_SERENUM_BUS_ENUMERATOR GUID_DEVINTERFACE_SERENUM_BUS_ENUMERATOR
70
71 #endif // DEFINE_GUID
72
73 #ifndef _WINIOCTL_
74 #define _WINIOCTL_
75
76
77 #ifndef _DEVIOCTL_
78 #define _DEVIOCTL_
79
80 // begin_ntddk begin_wdm begin_nthal begin_ntifs
81 //
82 // Define the various device type values.  Note that values used by Microsoft
83 // Corporation are in the range 0-32767, and 32768-65535 are reserved for use
84 // by customers.
Lines 85 ... 5234 are skipped.
5235 #endif // _FILESYSTEMFSCTL_
5236
5237
5238 #define IOCTL_VOLUME_BASE     ((DWORD) 'V')
5239
5240 #if (NTDDI_VERSION >= NTDDI_WIN2K)
5241
5242 //
5243 // These IOCTLs are handled by hard disk volumes.
5244 //
5245
5246 #define IOCTL_VOLUME_GET_VOLUME_DISK_EXTENTS      CTL_CODE(IOCTL_VOLUME_BASE, 0, METHOD_BUFFERED, FILE_ANY_ACCESS)
5247
5248 //
5249 // Disk extent definition.
5250 //
5251
5252 typedef struct _DISK_EXTENT {
5253       DWORD                  DiskNumber;
5254       LARGE_INTEGER     StartingOffset;
5255       LARGE_INTEGER     ExtentLength;
5256 } DISK_EXTENT, *PDISK_EXTENT;
5257
5258 //
5259 // Output structure for IOCTL_VOLUME_GET_VOLUME_DISK_EXTENTS.
5260 //
5261
5262 typedef struct _VOLUME_DISK_EXTENTS {
5263       DWORD           NumberOfDiskExtents;
5264       DISK_EXTENT Extents[1];
5265 } VOLUME_DISK_EXTENTS, *PVOLUME_DISK_EXTENTS;
5266
5267 #endif  // NTDDI_VERSION >= NTDDI_WIN2K
5268
5269 #if (NTDDI_VERSION >= NTDDI_WINXP)
5270
5271 //
5272 // These IOCTLs are handled by hard disk volumes.
5273 //
5274
5275 #define IOCTL_VOLUME_IS_CLUSTERED                         CTL_CODE(IOCTL_VOLUME_BASE, 12, METHOD_BUFFERED, FILE_ANY_ACCESS)
5276
5277 #endif  // NTDDI_VERSION >= NTDDI_WINXP
5278
5279
5280 #endif // _WINIOCTL_
5281
5282
5283