ReactOS 0.4.16-dev-319-g6cf4263
ntddvol.h
Go to the documentation of this file.
1/*
2 * ntddvol.h
3 *
4 * Volume IOCTL interface.
5 *
6 * This file is part of the ReactOS DDK package.
7 *
8 * Contributors:
9 * Created by Casper S. Hornstrup <chorns@users.sourceforge.net>
10 * Hermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
11 *
12 * THIS SOFTWARE IS NOT COPYRIGHTED
13 *
14 * This source code is offered for use in the public domain. You may
15 * use, modify or distribute it freely.
16 *
17 * This code is distributed in the hope that it will be useful but
18 * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
19 * DISCLAIMED. This includes but is not limited to warranties of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
21 *
22 */
23
24#ifndef _NTDDVOL_
25#define _NTDDVOL_
26
27#ifdef __cplusplus
28extern "C" {
29#endif
30
31#if defined(_WINIOCTL_) || defined(IOCTL_VOLUME_BASE)
32// Definitions duplicated in winioctl.h
33#define _WINIOCTL_DEFINED_
34#endif
35
36#ifndef _WINIOCTL_DEFINED_
37#define IOCTL_VOLUME_BASE ((ULONG) 'V')
38#endif /* _WINIOCTL_DEFINED_ */
39
40
41#if (NTDDI_VERSION >= NTDDI_WIN2K)
42
43#ifndef _WINIOCTL_DEFINED_
44#define IOCTL_VOLUME_GET_VOLUME_DISK_EXTENTS \
45 CTL_CODE(IOCTL_VOLUME_BASE, 0, METHOD_BUFFERED, FILE_ANY_ACCESS)
46
47typedef struct _DISK_EXTENT {
52
53typedef struct _VOLUME_DISK_EXTENTS {
57#endif /* _WINIOCTL_DEFINED_ */
58
59#define IOCTL_VOLUME_SUPPORTS_ONLINE_OFFLINE \
60 CTL_CODE(IOCTL_VOLUME_BASE, 1, METHOD_BUFFERED, FILE_ANY_ACCESS)
61
62#ifndef _WINIOCTL_DEFINED_
63#define IOCTL_VOLUME_ONLINE \
64 CTL_CODE(IOCTL_VOLUME_BASE, 2, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
65
66#define IOCTL_VOLUME_OFFLINE \
67 CTL_CODE(IOCTL_VOLUME_BASE, 3, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
68#endif /* _WINIOCTL_DEFINED_ */
69
70#define IOCTL_VOLUME_IS_OFFLINE \
71 CTL_CODE(IOCTL_VOLUME_BASE, 4, METHOD_BUFFERED, FILE_ANY_ACCESS)
72
73#define IOCTL_VOLUME_IS_IO_CAPABLE \
74 CTL_CODE(IOCTL_VOLUME_BASE, 5, METHOD_BUFFERED, FILE_ANY_ACCESS)
75
76#define IOCTL_VOLUME_QUERY_FAILOVER_SET \
77 CTL_CODE(IOCTL_VOLUME_BASE, 6, METHOD_BUFFERED, FILE_ANY_ACCESS)
78
79typedef struct _VOLUME_FAILOVER_SET {
83
84
85#define IOCTL_VOLUME_QUERY_VOLUME_NUMBER \
86 CTL_CODE(IOCTL_VOLUME_BASE, 7, METHOD_BUFFERED, FILE_ANY_ACCESS)
87
88#define IOCTL_VOLUME_LOGICAL_TO_PHYSICAL \
89 CTL_CODE(IOCTL_VOLUME_BASE, 8, METHOD_BUFFERED, FILE_ANY_ACCESS)
90
91#define IOCTL_VOLUME_PHYSICAL_TO_LOGICAL \
92 CTL_CODE(IOCTL_VOLUME_BASE, 9, METHOD_BUFFERED, FILE_ANY_ACCESS)
93
94typedef struct _VOLUME_NUMBER {
98
99typedef struct _VOLUME_LOGICAL_OFFSET {
102
107
112
113#endif /* (NTDDI_VERSION >= NTDDI_WIN2K) */
114
115
116#if (NTDDI_VERSION >= NTDDI_WINXP)
117
118#define IOCTL_VOLUME_IS_PARTITION \
119 CTL_CODE(IOCTL_VOLUME_BASE, 10, METHOD_BUFFERED, FILE_ANY_ACCESS)
120
121#define IOCTL_VOLUME_READ_PLEX \
122 CTL_CODE(IOCTL_VOLUME_BASE, 11, METHOD_OUT_DIRECT, FILE_READ_ACCESS)
123
124#ifndef _WINIOCTL_DEFINED_
125#define IOCTL_VOLUME_IS_CLUSTERED \
126 CTL_CODE(IOCTL_VOLUME_BASE, 12, METHOD_BUFFERED, FILE_ANY_ACCESS)
127#endif /* _WINIOCTL_DEFINED_ */
128
129#define IOCTL_VOLUME_SET_GPT_ATTRIBUTES \
130 CTL_CODE(IOCTL_VOLUME_BASE, 13, METHOD_BUFFERED, FILE_ANY_ACCESS)
131
132#ifndef _WINIOCTL_DEFINED_
133#define IOCTL_VOLUME_GET_GPT_ATTRIBUTES \
134 CTL_CODE(IOCTL_VOLUME_BASE, 14, METHOD_BUFFERED, FILE_ANY_ACCESS)
135#endif /* _WINIOCTL_DEFINED_ */
136
142
150
151#ifndef _WINIOCTL_DEFINED_
155#endif /* _WINIOCTL_DEFINED_ */
156
157#endif /* (NTDDI_VERSION >= NTDDI_WINXP) */
158
159
160#if (NTDDI_VERSION >= NTDDI_VISTA)
161// TODO: Missing definitions
162#endif /* (NTDDI_VERSION >= NTDDI_VISTA) */
163
164
165#if (NTDDI_VERSION >= NTDDI_WIN8)
166
167#define IOCTL_VOLUME_POST_ONLINE \
168 CTL_CODE(IOCTL_VOLUME_BASE, 25, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
169
170#endif /* (NTDDI_VERSION >= NTDDI_WIN8) */
171
172
173#ifdef _WINIOCTL_DEFINED_
174#undef _WINIOCTL_DEFINED_
175#endif
176
177#ifdef __cplusplus
178}
179#endif
180
181#endif /* _NTDDVOL_ */
unsigned char BOOLEAN
struct _VOLUME_READ_PLEX_INPUT VOLUME_READ_PLEX_INPUT
struct _VOLUME_PHYSICAL_OFFSETS * PVOLUME_PHYSICAL_OFFSETS
struct _VOLUME_READ_PLEX_INPUT * PVOLUME_READ_PLEX_INPUT
struct _VOLUME_FAILOVER_SET VOLUME_FAILOVER_SET
struct _VOLUME_DISK_EXTENTS * PVOLUME_DISK_EXTENTS
struct _VOLUME_LOGICAL_OFFSET * PVOLUME_LOGICAL_OFFSET
struct _VOLUME_PHYSICAL_OFFSET * PVOLUME_PHYSICAL_OFFSET
struct _VOLUME_PHYSICAL_OFFSET VOLUME_PHYSICAL_OFFSET
struct _VOLUME_NUMBER VOLUME_NUMBER
struct _VOLUME_DISK_EXTENTS VOLUME_DISK_EXTENTS
struct _DISK_EXTENT DISK_EXTENT
struct _VOLUME_NUMBER * PVOLUME_NUMBER
struct _VOLUME_FAILOVER_SET * PVOLUME_FAILOVER_SET
struct _VOLUME_SET_GPT_ATTRIBUTES_INFORMATION VOLUME_SET_GPT_ATTRIBUTES_INFORMATION
struct _VOLUME_GET_GPT_ATTRIBUTES_INFORMATION * PVOLUME_GET_GPT_ATTRIBUTES_INFORMATION
struct _DISK_EXTENT * PDISK_EXTENT
struct _VOLUME_PHYSICAL_OFFSETS VOLUME_PHYSICAL_OFFSETS
struct _VOLUME_LOGICAL_OFFSET VOLUME_LOGICAL_OFFSET
struct _VOLUME_GET_GPT_ATTRIBUTES_INFORMATION VOLUME_GET_GPT_ATTRIBUTES_INFORMATION
struct _VOLUME_SET_GPT_ATTRIBUTES_INFORMATION * PVOLUME_SET_GPT_ATTRIBUTES_INFORMATION
unsigned short USHORT
Definition: pedump.c:61
ULONG DiskNumber
Definition: ntddvol.h:48
LARGE_INTEGER StartingOffset
Definition: ntddvol.h:49
LARGE_INTEGER ExtentLength
Definition: ntddvol.h:50
DISK_EXTENT Extents[1]
Definition: ntddvol.h:55
ULONG NumberOfDiskExtents
Definition: ntddvol.h:54
ULONG DiskNumbers[1]
Definition: ntddvol.h:81
LONGLONG LogicalOffset
Definition: ntddvol.h:100
WCHAR VolumeManagerName[8]
Definition: ntddvol.h:96
ULONG VolumeNumber
Definition: ntddvol.h:95
VOLUME_PHYSICAL_OFFSET PhysicalOffset[1]
Definition: ntddvol.h:110
LARGE_INTEGER ByteOffset
Definition: ntddvol.h:138
int64_t LONGLONG
Definition: typedefs.h:68
uint32_t ULONG
Definition: typedefs.h:59
uint64_t ULONGLONG
Definition: typedefs.h:67
__wchar_t WCHAR
Definition: xmlstorage.h:180