po: Update Lithuanian translation.
[wine.git] / include / virtdisk.h
blob0c81ee118e171c27115f4de8aaf2e2f50fa8a063
1 /*
2 * Copyright 2017 Louis Lenders
3 * Copyright 2018 Gijs Vermeulen
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
20 #ifndef __WINE_VIRTDISK_DLL_H
21 #define __WINE_VIRTDISK_DLL_H
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
27 #define VIRTUAL_STORAGE_TYPE_DEVICE_UNKNOWN 0
28 #define VIRTUAL_STORAGE_TYPE_DEVICE_ISO 1
29 #define VIRTUAL_STORAGE_TYPE_DEVICE_VHD 2
30 #define VIRTUAL_STORAGE_TYPE_DEVICE_VHDX 3
31 #define VIRTUAL_STORAGE_TYPE_DEVICE_VHDSET 4
33 DEFINE_GUID(VIRTUAL_STORAGE_TYPE_VENDOR_UNKNOWN, 0x00000000, 0x0000, 0x0000, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00);
34 DEFINE_GUID(VIRTUAL_STORAGE_TYPE_VENDOR_MICROSOFT, 0xec984aec, 0xa0f9, 0x47e9, 0x90, 0x1f, 0x71, 0x41, 0x5a, 0x66, 0x34, 0x5b);
36 typedef enum _ATTACH_VIRTUAL_DISK_FLAG {
37 ATTACH_VIRTUAL_DISK_FLAG_NONE = 0x00,
38 ATTACH_VIRTUAL_DISK_FLAG_READ_ONLY = 0x01,
39 ATTACH_VIRTUAL_DISK_FLAG_NO_DRIVE_LETTER = 0x02,
40 ATTACH_VIRTUAL_DISK_FLAG_PERMANENT_LIFETIME = 0x04,
41 ATTACH_VIRTUAL_DISK_FLAG_NO_LOCAL_HOST = 0x08,
42 ATTACH_VIRTUAL_DISK_FLAG_NO_SECURITY_DESCRIPTOR = 0x10
43 } ATTACH_VIRTUAL_DISK_FLAG;
45 typedef enum _OPEN_VIRTUAL_DISK_FLAG {
46 OPEN_VIRTUAL_DISK_FLAG_NONE = 0x00,
47 OPEN_VIRTUAL_DISK_FLAG_NO_PARENTS = 0x01,
48 OPEN_VIRTUAL_DISK_FLAG_BLANK_FILE = 0x02,
49 OPEN_VIRTUAL_DISK_FLAG_BOOT_DRIVE = 0x04,
50 OPEN_VIRTUAL_DISK_FLAG_CACHED_IO = 0x08,
51 OPEN_VIRTUAL_DISK_FLAG_CUSTOM_DIFF_CHAIN = 0x10,
52 OPEN_VIRTUAL_DISK_FLAG_PARENT_CACHED_IO = 0x20,
53 OPEN_VIRTUAL_DISK_FLAG_VHDSET_FILE_ONLY = 0x40,
54 OPEN_VIRTUAL_DISK_FLAG_IGNORE_RELATIVE_PARENT_LOCATOR = 0x80,
55 OPEN_VIRTUAL_DISK_FLAG_NO_WRITE_HARDENING = 0x100
56 } OPEN_VIRTUAL_DISK_FLAG;
58 typedef enum _OPEN_VIRTUAL_DISK_VERSION {
59 OPEN_VIRTUAL_DISK_VERSION_UNSCPECIFIED,
60 OPEN_VIRTUAL_DISK_VERSION_1,
61 OPEN_VIRTUAL_DISK_VERSION_2,
62 OPEN_VIRTUAL_DISK_VERSION_3
63 } OPEN_VIRTUAL_DISK_VERSION;
65 typedef enum _ATTACH_VIRTUAL_DISK_VERSION {
66 ATTACH_VIRTUAL_DISK_VERSION_UNSPECIFIED,
67 ATTACH_VIRTUAL_DISK_VERSION_1
68 } ATTACH_VIRTUAL_DISK_VERSION;
70 typedef enum _COMPACT_VIRTUAL_DISK_FLAG {
71 COMPACT_VIRTUAL_DISK_FLAG_NONE = 0x00,
72 COMPACT_VIRTUAL_DISK_FLAG_NO_ZERO_SCAN = 0x01,
73 COMPACT_VIRTUAL_DISK_FLAG_NO_BLOCK_MOVES = 0x02
74 } COMPACT_VIRTUAL_DISK_FLAG;
76 typedef enum _COMPACT_VIRTUAL_DISK_VERSION {
77 COMPACT_VIRTUAL_DISK_VERSION_UNSPECIFIED,
78 COMPACT_VIRTUAL_DISK_VERSION_1
79 } COMPACT_VIRTUAL_DISK_VERSION;
81 typedef enum _DEPENDENT_DISK_FLAG
83 DEPENDENT_DISK_FLAG_NONE = 0x00000000,
84 DEPENDENT_DISK_FLAG_MULT_BACKING_FILES = 0x00000001,
85 DEPENDENT_DISK_FLAG_FULLY_ALLOCATED = 0x00000002,
86 DEPENDENT_DISK_FLAG_READ_ONLY = 0x00000004,
87 DEPENDENT_DISK_FLAG_REMOTE = 0x00000008,
88 DEPENDENT_DISK_FLAG_SYSTEM_VOLUME = 0x00000010,
89 DEPENDENT_DISK_FLAG_SYSTEM_VOLUME_PARENT = 0x00000020,
90 DEPENDENT_DISK_FLAG_REMOVABLE = 0x00000040,
91 DEPENDENT_DISK_FLAG_NO_DRIVE_LETTER = 0x00000080,
92 DEPENDENT_DISK_FLAG_PARENT = 0x00000100,
93 DEPENDENT_DISK_FLAG_NO_HOST_DISK = 0x00000200,
94 DEPENDENT_DISK_FLAG_PERMANENT_LIFETIME = 0x00000400
95 } DEPENDENT_DISK_FLAG;
97 typedef enum _EXPAND_VIRTUAL_DISK_VERSION {
98 EXPAND_VIRTUAL_DISK_VERSION_UNSPECIFIED,
99 EXPAND_VIRTUAL_DISK_VERSION_1
100 } EXPAND_VIRTUAL_DISK_VERSION;
102 typedef enum _DETACH_VIRTUAL_DISK_FLAG {
103 DETACH_VIRTUAL_DISK_FLAG_NONE = 0x00000000
104 } DETACH_VIRTUAL_DISK_FLAG;
106 typedef enum _EXPAND_VIRTUAL_DISK_FLAG {
107 EXPAND_VIRTUAL_DISK_FLAG_NONE = 0x00000000
108 } EXPAND_VIRTUAL_DISK_FLAG;
110 typedef enum _GET_STORAGE_DEPENDENCY_FLAG
112 GET_STORAGE_DEPENDENCY_FLAG_NONE = 0x00,
113 GET_STORAGE_DEPENDENCY_FLAG_HOST_VOLUMES = 0x01,
114 GET_STORAGE_DEPENDENCY_FLAG_DISK_HANDLE = 0x02
115 } GET_STORAGE_DEPENDENCY_FLAG;
117 typedef enum _MIRROR_VIRTUAL_DISK_FLAG {
118 MIRROR_VIRTUAL_DISK_FLAG_NONE = 0x00,
119 MIRROR_VIRTUAL_DISK_FLAG_EXISTING_FILE = 0x01
120 } MIRROR_VIRTUAL_DISK_FLAG;
122 typedef enum _MIRROR_VIRTUAL_DISK_VERSION {
123 MIRROR_VIRTUAL_DISK_VERSION_UNSPECIFIED,
124 MIRROR_VIRTUAL_DISK_VERSION_1
125 } MIRROR_VIRTUAL_DISK_VERSION;
127 typedef enum _MERGE_VIRTUAL_DISK_FLAG {
128 MERGE_VIRTUAL_DISK_FLAG_NONE = 0x00000000
129 } MERGE_VIRTUAL_DISK_FLAG;
131 typedef enum _STORAGE_DEPENDENCY_INFO_VERSION
133 STORAGE_DEPENDENCY_INFO_VERSION_UNSPECIFIED = 0x0,
134 STORAGE_DEPENDENCY_INFO_VERSION_1 = 0x1,
135 STORAGE_DEPENDENCY_INFO_VERSION_2 = 0x2
136 } STORAGE_DEPENDENCY_INFO_VERSION;
138 typedef enum _VIRTUAL_DISK_ACCESS_MASK {
139 VIRTUAL_DISK_ACCESS_NONE = 0x00000000,
140 VIRTUAL_DISK_ACCESS_ATTACH_RO = 0x00010000,
141 VIRTUAL_DISK_ACCESS_ATTACH_RW = 0x00020000,
142 VIRTUAL_DISK_ACCESS_DETACH = 0x00040000,
143 VIRTUAL_DISK_ACCESS_GET_INFO = 0x00080000,
144 VIRTUAL_DISK_ACCESS_CREATE = 0x00100000,
145 VIRTUAL_DISK_ACCESS_METAOPS = 0x00200000,
146 VIRTUAL_DISK_ACCESS_READ = 0x000d0000,
147 VIRTUAL_DISK_ACCESS_ALL = 0x003f0000,
148 VIRTUAL_DISK_ACCESS_WRITABLE = 0x00320000
149 } VIRTUAL_DISK_ACCESS_MASK;
151 typedef struct _VIRTUAL_STORAGE_TYPE
153 ULONG DeviceId;
154 GUID VendorId;
155 } VIRTUAL_STORAGE_TYPE, *PVIRTUAL_STORAGE_TYPE;
157 typedef struct _ATTACH_VIRTUAL_DISK_PARAMETERS {
158 ATTACH_VIRTUAL_DISK_VERSION Version;
159 __C89_NAMELESS union {
160 struct {
161 ULONG Reserved;
162 } Version1;
163 } DUMMYUNIONNAME;
164 } ATTACH_VIRTUAL_DISK_PARAMETERS, *PATTACH_VIRTUAL_DISK_PARAMETERS;
166 typedef struct _COMPACT_VIRTUAL_DISK_PARAMETERS {
167 COMPACT_VIRTUAL_DISK_VERSION Version;
168 __C89_NAMELESS union {
169 struct {
170 ULONG Reserved;
171 } Version1;
172 } DUMMYUNIONNAME;
173 } COMPACT_VIRTUAL_DISK_PARAMETERS, *PCOMPACT_VIRTUAL_DISK_PARAMETERS;
175 typedef struct _EXPAND_VIRTUAL_DISK_PARAMETERS {
176 EXPAND_VIRTUAL_DISK_VERSION Version;
177 __C89_NAMELESS union {
178 struct {
179 ULONGLONG NewSize;
180 } Version1;
181 } DUMMYUNIONNAME;
182 } EXPAND_VIRTUAL_DISK_PARAMETERS, *PEXPAND_VIRTUAL_DISK_PARAMETERS;
184 typedef struct _OPEN_VIRTUAL_DISK_PARAMETERS
186 OPEN_VIRTUAL_DISK_VERSION Version;
187 __C89_NAMELESS union {
188 struct {
189 ULONG RWDepth;
190 } Version1;
191 struct {
192 BOOL GetInfoOnly;
193 BOOL ReadOnly;
194 GUID ResiliencyGuid;
195 } Version2;
196 struct {
197 BOOL GetInfoOnly;
198 BOOL ReadOnly;
199 GUID ResiliencyGuid;
200 GUID SnapshotId;
201 } Version3;
202 } DUMMYUNIONNAME;
203 } OPEN_VIRTUAL_DISK_PARAMETERS, *POPEN_VIRTUAL_DISK_PARAMETERS;
205 typedef struct _STORAGE_DEPENDENCY_INFO_TYPE_1
207 DEPENDENT_DISK_FLAG DependencyTypeFlags;
208 ULONG ProviderSpecificFlags;
209 VIRTUAL_STORAGE_TYPE VirtualStorageType;
210 } STORAGE_DEPENDENCY_INFO_TYPE_1, *PSTORAGE_DEPENDENCY_INFO_TYPE_1;
212 typedef struct _STORAGE_DEPENDENCY_INFO_TYPE_2
214 DEPENDENT_DISK_FLAG DependencyTypeFlags;
215 ULONG ProviderSpecificFlags;
216 VIRTUAL_STORAGE_TYPE VirtualStorageType;
217 ULONG AncestorLevel;
218 PWSTR DependencyDeviceName;
219 PWSTR HostVolumeName;
220 PWSTR DependentVolumeName;
221 PWSTR DependentVolumeRelativePath;
222 } STORAGE_DEPENDENCY_INFO_TYPE_2, *PSTORAGE_DEPENDENCY_INFO_TYPE_2;
224 typedef struct _STORAGE_DEPENDENCY_INFO
226 STORAGE_DEPENDENCY_INFO_VERSION Version;
227 ULONG NumberEntries;
228 #if !defined(__WINESRC__) && (defined(_MSC_EXTENSIONS) || ((defined(__GNUC__) && __GNUC__ >= 3)))
229 __C89_NAMELESS union
231 STORAGE_DEPENDENCY_INFO_TYPE_1 Version1Entries[];
232 STORAGE_DEPENDENCY_INFO_TYPE_2 Version2Entries[];
233 } __C89_NAMELESSUNIONNAME;
234 #endif
235 } STORAGE_DEPENDENCY_INFO, *PSTORAGE_DEPENDENCY_INFO;
237 typedef struct _VIRTUAL_DISK_PROGRESS {
238 DWORD OperationStatus;
239 ULONGLONG CurrentValue;
240 ULONGLONG CompletionValue;
241 } VIRTUAL_DISK_PROGRESS, *PVIRTUAL_DISK_PROGRESS;
243 DWORD WINAPI GetStorageDependencyInformation(HANDLE obj, GET_STORAGE_DEPENDENCY_FLAG flags, ULONG size, STORAGE_DEPENDENCY_INFO *info, ULONG *used);
245 DWORD WINAPI OpenVirtualDisk(VIRTUAL_STORAGE_TYPE *type, const WCHAR *path, VIRTUAL_DISK_ACCESS_MASK mask, OPEN_VIRTUAL_DISK_FLAG flags,
246 OPEN_VIRTUAL_DISK_PARAMETERS *param, HANDLE *handle);
248 #ifdef __cplusplus
250 #endif
252 #endif /* __WINE_VIRTDISK_DLL_H */