Work around MinGW mangling of "host:/path"
[msysgit/historical-msysgit.git] / mingw / include / ddk / ntddvol.h
blobbc0932a98e3911bbff031e3ad2296ddf90b61e35
1 /*
2 * ntddvol.h
4 * Volume IOCTL interface.
6 * This file is part of the w32api package.
8 * Contributors:
9 * Created by Casper S. Hornstrup <chorns@users.sourceforge.net>
11 * THIS SOFTWARE IS NOT COPYRIGHTED
13 * This source code is offered for use in the public domain. You may
14 * use, modify or distribute it freely.
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.
23 #ifndef __NTDDVOL_H
24 #define __NTDDVOL_H
26 #if __GNUC__ >=3
27 #pragma GCC system_header
28 #endif
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
34 #include "ntddk.h"
36 #define IOCTL_VOLUME_BASE ((ULONG) 'V')
38 #define IOCTL_VOLUME_LOGICAL_TO_PHYSICAL \
39 CTL_CODE(IOCTL_VOLUME_BASE, 8, METHOD_BUFFERED, FILE_ANY_ACCESS)
41 #define IOCTL_VOLUME_PHYSICAL_TO_LOGICAL \
42 CTL_CODE(IOCTL_VOLUME_BASE, 9, METHOD_BUFFERED, FILE_ANY_ACCESS)
44 #define IOCTL_VOLUME_READ_PLEX \
45 CTL_CODE(IOCTL_VOLUME_BASE, 11, METHOD_OUT_DIRECT, FILE_READ_ACCESS)
47 #define IOCTL_VOLUME_GET_VOLUME_DISK_EXTENTS \
48 CTL_CODE(IOCTL_VOLUME_BASE, 0, METHOD_BUFFERED, FILE_ANY_ACCESS)
50 #define IOCTL_VOLUME_IS_CLUSTERED \
51 CTL_CODE(IOCTL_VOLUME_BASE, 12, METHOD_BUFFERED, FILE_ANY_ACCESS)
53 #define IOCTL_VOLUME_QUERY_VOLUME_NUMBER \
54 CTL_CODE(IOCTL_VOLUME_BASE, 7, METHOD_BUFFERED, FILE_ANY_ACCESS)
56 #define IOCTL_VOLUME_IS_PARTITION \
57 CTL_CODE(IOCTL_VOLUME_BASE, 10, METHOD_BUFFERED, FILE_ANY_ACCESS)
59 #define IOCTL_VOLUME_SET_GPT_ATTRIBUTES \
60 CTL_CODE(IOCTL_VOLUME_BASE, 13, METHOD_BUFFERED, FILE_ANY_ACCESS)
62 #define IOCTL_VOLUME_GET_GPT_ATTRIBUTES \
63 CTL_CODE(IOCTL_VOLUME_BASE, 14, METHOD_BUFFERED, FILE_ANY_ACCESS)
65 #define IOCTL_VOLUME_SUPPORTS_ONLINE_OFFLINE \
66 CTL_CODE(IOCTL_VOLUME_BASE, 1, METHOD_BUFFERED, FILE_ANY_ACCESS)
68 #define IOCTL_VOLUME_ONLINE \
69 CTL_CODE(IOCTL_VOLUME_BASE, 2, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
71 #define IOCTL_VOLUME_OFFLINE \
72 CTL_CODE(IOCTL_VOLUME_BASE, 3, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
74 #define IOCTL_VOLUME_IS_OFFLINE \
75 CTL_CODE(IOCTL_VOLUME_BASE, 4, METHOD_BUFFERED, FILE_ANY_ACCESS)
77 #define IOCTL_VOLUME_IS_IO_CAPABLE \
78 CTL_CODE(IOCTL_VOLUME_BASE, 5, METHOD_BUFFERED, FILE_ANY_ACCESS)
80 #define IOCTL_VOLUME_QUERY_FAILOVER_SET \
81 CTL_CODE(IOCTL_VOLUME_BASE, 6, METHOD_BUFFERED, FILE_ANY_ACCESS)
84 typedef struct _VOLUME_LOGICAL_OFFSET {
85 LONGLONG LogicalOffset;
86 } VOLUME_LOGICAL_OFFSET, *PVOLUME_LOGICAL_OFFSET;
88 typedef struct _VOLUME_PHYSICAL_OFFSET {
89 ULONG DiskNumber;
90 LONGLONG Offset;
91 } VOLUME_PHYSICAL_OFFSET, *PVOLUME_PHYSICAL_OFFSET;
93 typedef struct _VOLUME_PHYSICAL_OFFSETS {
94 ULONG NumberOfPhysicalOffsets;
95 VOLUME_PHYSICAL_OFFSET PhysicalOffset[1];
96 } VOLUME_PHYSICAL_OFFSETS, *PVOLUME_PHYSICAL_OFFSETS;
98 typedef struct _VOLUME_READ_PLEX_INPUT {
99 LARGE_INTEGER ByteOffset;
100 ULONG Length;
101 ULONG PlexNumber;
102 } VOLUME_READ_PLEX_INPUT, *PVOLUME_READ_PLEX_INPUT;
104 typedef struct _VOLUME_GET_GPT_ATTRIBUTES_INFORMATION {
105 ULONGLONG GptAttributes;
106 } VOLUME_GET_GPT_ATTRIBUTES_INFORMATION, *PVOLUME_GET_GPT_ATTRIBUTES_INFORMATION;
108 typedef struct _VOLUME_SET_GPT_ATTRIBUTES_INFORMATION {
109 ULONGLONG GptAttributes;
110 BOOLEAN RevertOnClose;
111 BOOLEAN ApplyToAllConnectedVolumes;
112 USHORT Reserved1;
113 ULONG Reserved2;
114 } VOLUME_SET_GPT_ATTRIBUTES_INFORMATION, *PVOLUME_SET_GPT_ATTRIBUTES_INFORMATION;
116 typedef struct _DISK_EXTENT {
117 ULONG DiskNumber;
118 LARGE_INTEGER StartingOffset;
119 LARGE_INTEGER ExtentLength;
120 } DISK_EXTENT, *PDISK_EXTENT;
122 typedef struct _VOLUME_DISK_EXTENTS {
123 ULONG NumberOfDiskExtents;
124 DISK_EXTENT Extents[1];
125 } VOLUME_DISK_EXTENTS, *PVOLUME_DISK_EXTENTS;
127 typedef struct _VOLUME_NUMBER {
128 ULONG VolumeNumber;
129 WCHAR VolumeManagerName[8];
130 } VOLUME_NUMBER, *PVOLUME_NUMBER;
132 typedef struct _VOLUME_FAILOVER_SET {
133 ULONG NumberOfDisks;
134 ULONG DiskNumbers[1];
135 } VOLUME_FAILOVER_SET, *PVOLUME_FAILOVER_SET;
137 #ifdef __cplusplus
139 #endif
141 #endif /* __NTDDVOL_H */