2.2.2.19.1.4 VIRTUAL_DISK_ACCESS_MASK
The VIRTUAL_DISK_ACCESS_MASK enumeration contains the bit mask for specifying access rights to a virtual hard disk (VHD).
-
typedef enum _VIRTUAL_DISK_ACCESS_MASK { VIRTUAL_DISK_ACCESS_SURFACE_RO = 0x00010000, VIRTUAL_DISK_ACCESS_SURFACE_RW = 0x00020000, VIRTUAL_DISK_ACCESS_UNSURFACE = 0x00040000, VIRTUAL_DISK_ACCESS_GET_INFO = 0x00080000, VIRTUAL_DISK_ACCESS_CREATE = 0x00100000, VIRTUAL_DISK_ACCESS_METAOPS = 0x00200000, VIRTUAL_DISK_ACCESS_READ = 0x000d0000, VIRTUAL_DISK_ACCESS_ALL = 0x003f0000, VIRTUAL_DISK_ACCESS_WRITABLE = 0x00320000 } VIRTUAL_DISK_ACCESS_MASK;
VIRTUAL_DISK_ACCESS_SURFACE_RO: Open the VHD for read-only surfacing (attaching) access. The caller MUST have READ access to the virtual disk image file. If used in a request to open a VHD that is already open, the other handles are limited to either VIRTUAL_DISK_ACCESS_UNSURFACE or VIRTUAL_DISK_ACCESS_GET_INFO access; otherwise, the open request with this flag will fail.
VIRTUAL_DISK_ACCESS_SURFACE_RW: Open the VHD for read-write surfacing (attaching) access. The caller MUST have (READ | WRITE) access to the virtual disk image file. If used in a request to open a VHD that is already open, the other handles are limited to either VIRTUAL_DISK_ACCESS_UNSURFACE or VIRTUAL_DISK_ACCESS_GET_INFO access; otherwise, the open request with this flag will fail. If the VHD is part of a differencing chain, the disk number for this request cannot be less than the ReadWriteDepth specified during the prior open request for that differencing chain.
VIRTUAL_DISK_ACCESS_UNSURFACE: Open the VHD to allow unsurfacing (detaching) of a surfaced (attached) VHD. The caller MUST have (FILE_READ_ATTRIBUTES | FILE_READ_DATA) access to the virtual disk image file.
VIRTUAL_DISK_ACCESS_GET_INFO: Open the VHD for retrieval of information. The caller MUST have READ access to the virtual disk image file.
VIRTUAL_DISK_ACCESS_CREATE: Open the VHD for creation.
VIRTUAL_DISK_ACCESS_METAOPS: Open the VHD to perform offline metaoperations. For information on the offline metaoperations, see [MSDN-CompactVirtualDisk], [MSDN-ExpandVirtualDisk], [MSDN-MergeVirtualDisk], [MSDN-SetVirtualDiskInfo], and [MSDN-VIRTDSKACCMSK]. The caller MUST have (READ | WRITE) access to the virtual disk image file, up to ReadWriteDepth if working with a differencing chain. If the VHD is part of a differencing chain, the backing store (host volume) is opened in read/write exclusive mode up to ReadWriteDepth.
VIRTUAL_DISK_ACCESS_READ: Reserved.
VIRTUAL_DISK_ACCESS_ALL: Allows unrestricted access to the VHD. The caller MUST have unrestricted access rights to the virtual disk image file.
VIRTUAL_DISK_ACCESS_WRITABLE: Reserved.