[1046] | 1 | /*
|
---|
| 2 | * ntddvol.h
|
---|
| 3 | *
|
---|
| 4 | * Volume 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 __NTDDVOL_H
|
---|
| 24 | #define __NTDDVOL_H
|
---|
| 25 |
|
---|
| 26 | #if __GNUC__ >=3
|
---|
| 27 | #pragma GCC system_header
|
---|
| 28 | #endif
|
---|
| 29 |
|
---|
| 30 | #ifdef __cplusplus
|
---|
| 31 | extern "C" {
|
---|
| 32 | #endif
|
---|
| 33 |
|
---|
| 34 | #include "ntddk.h"
|
---|
| 35 |
|
---|
| 36 | #define IOCTL_VOLUME_BASE ((ULONG) 'V')
|
---|
| 37 |
|
---|
| 38 | #define IOCTL_VOLUME_LOGICAL_TO_PHYSICAL \
|
---|
| 39 | CTL_CODE(IOCTL_VOLUME_BASE, 8, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
---|
| 40 |
|
---|
| 41 | #define IOCTL_VOLUME_PHYSICAL_TO_LOGICAL \
|
---|
| 42 | CTL_CODE(IOCTL_VOLUME_BASE, 9, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
---|
| 43 |
|
---|
| 44 | #define IOCTL_VOLUME_READ_PLEX \
|
---|
| 45 | CTL_CODE(IOCTL_VOLUME_BASE, 11, METHOD_OUT_DIRECT, FILE_READ_ACCESS)
|
---|
| 46 |
|
---|
| 47 | #define IOCTL_VOLUME_GET_VOLUME_DISK_EXTENTS \
|
---|
| 48 | CTL_CODE(IOCTL_VOLUME_BASE, 0, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
---|
| 49 |
|
---|
| 50 | #define IOCTL_VOLUME_IS_CLUSTERED \
|
---|
| 51 | CTL_CODE(IOCTL_VOLUME_BASE, 12, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
---|
| 52 |
|
---|
| 53 | #define IOCTL_VOLUME_QUERY_VOLUME_NUMBER \
|
---|
| 54 | CTL_CODE(IOCTL_VOLUME_BASE, 7, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
---|
| 55 |
|
---|
| 56 | #define IOCTL_VOLUME_IS_PARTITION \
|
---|
| 57 | CTL_CODE(IOCTL_VOLUME_BASE, 10, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
---|
| 58 |
|
---|
| 59 | #define IOCTL_VOLUME_SET_GPT_ATTRIBUTES \
|
---|
| 60 | CTL_CODE(IOCTL_VOLUME_BASE, 13, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
---|
| 61 |
|
---|
| 62 | #define IOCTL_VOLUME_GET_GPT_ATTRIBUTES \
|
---|
| 63 | CTL_CODE(IOCTL_VOLUME_BASE, 14, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
---|
| 64 |
|
---|
| 65 | #define IOCTL_VOLUME_SUPPORTS_ONLINE_OFFLINE \
|
---|
| 66 | CTL_CODE(IOCTL_VOLUME_BASE, 1, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
---|
| 67 |
|
---|
| 68 | #define IOCTL_VOLUME_ONLINE \
|
---|
| 69 | CTL_CODE(IOCTL_VOLUME_BASE, 2, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
|
---|
| 70 |
|
---|
| 71 | #define IOCTL_VOLUME_OFFLINE \
|
---|
| 72 | CTL_CODE(IOCTL_VOLUME_BASE, 3, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
|
---|
| 73 |
|
---|
| 74 | #define IOCTL_VOLUME_IS_OFFLINE \
|
---|
| 75 | CTL_CODE(IOCTL_VOLUME_BASE, 4, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
---|
| 76 |
|
---|
| 77 | #define IOCTL_VOLUME_IS_IO_CAPABLE \
|
---|
| 78 | CTL_CODE(IOCTL_VOLUME_BASE, 5, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
---|
| 79 |
|
---|
| 80 | #define IOCTL_VOLUME_QUERY_FAILOVER_SET \
|
---|
| 81 | CTL_CODE(IOCTL_VOLUME_BASE, 6, METHOD_BUFFERED, FILE_ANY_ACCESS)
|
---|
| 82 |
|
---|
| 83 |
|
---|
| 84 | typedef struct _VOLUME_LOGICAL_OFFSET {
|
---|
| 85 | LONGLONG LogicalOffset;
|
---|
| 86 | } VOLUME_LOGICAL_OFFSET, *PVOLUME_LOGICAL_OFFSET;
|
---|
| 87 |
|
---|
| 88 | typedef struct _VOLUME_PHYSICAL_OFFSET {
|
---|
| 89 | ULONG DiskNumber;
|
---|
| 90 | LONGLONG Offset;
|
---|
| 91 | } VOLUME_PHYSICAL_OFFSET, *PVOLUME_PHYSICAL_OFFSET;
|
---|
| 92 |
|
---|
| 93 | typedef struct _VOLUME_PHYSICAL_OFFSETS {
|
---|
| 94 | ULONG NumberOfPhysicalOffsets;
|
---|
| 95 | VOLUME_PHYSICAL_OFFSET PhysicalOffset[1];
|
---|
| 96 | } VOLUME_PHYSICAL_OFFSETS, *PVOLUME_PHYSICAL_OFFSETS;
|
---|
| 97 |
|
---|
| 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;
|
---|
| 103 |
|
---|
| 104 | typedef struct _VOLUME_GET_GPT_ATTRIBUTES_INFORMATION {
|
---|
| 105 | ULONGLONG GptAttributes;
|
---|
| 106 | } VOLUME_GET_GPT_ATTRIBUTES_INFORMATION, *PVOLUME_GET_GPT_ATTRIBUTES_INFORMATION;
|
---|
| 107 |
|
---|
| 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;
|
---|
| 115 |
|
---|
| 116 | typedef struct _DISK_EXTENT {
|
---|
| 117 | ULONG DiskNumber;
|
---|
| 118 | LARGE_INTEGER StartingOffset;
|
---|
| 119 | LARGE_INTEGER ExtentLength;
|
---|
| 120 | } DISK_EXTENT, *PDISK_EXTENT;
|
---|
| 121 |
|
---|
| 122 | typedef struct _VOLUME_DISK_EXTENTS {
|
---|
| 123 | ULONG NumberOfDiskExtents;
|
---|
| 124 | DISK_EXTENT Extents[1];
|
---|
| 125 | } VOLUME_DISK_EXTENTS, *PVOLUME_DISK_EXTENTS;
|
---|
| 126 |
|
---|
| 127 | typedef struct _VOLUME_NUMBER {
|
---|
| 128 | ULONG VolumeNumber;
|
---|
| 129 | WCHAR VolumeManagerName[8];
|
---|
| 130 | } VOLUME_NUMBER, *PVOLUME_NUMBER;
|
---|
| 131 |
|
---|
| 132 | typedef struct _VOLUME_FAILOVER_SET {
|
---|
| 133 | ULONG NumberOfDisks;
|
---|
| 134 | ULONG DiskNumbers[1];
|
---|
| 135 | } VOLUME_FAILOVER_SET, *PVOLUME_FAILOVER_SET;
|
---|
| 136 |
|
---|
| 137 | #ifdef __cplusplus
|
---|
| 138 | }
|
---|
| 139 | #endif
|
---|
| 140 |
|
---|
| 141 | #endif /* __NTDDVOL_H */
|
---|