13.07.2015 Views

[MS-VDS]: Virtual Disk Service (VDS) Protocol Specification

[MS-VDS]: Virtual Disk Service (VDS) Protocol Specification

[MS-VDS]: Virtual Disk Service (VDS) Protocol Specification

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

•Return an HRESULT indicating failure or success.3.4.5.2.30.10 IVdsVolume::SetFlags (Opnum 12)The SetFlags method assigns flags to a volume.HRESULT SetFlags([in] unsigned long ulFlags,[in] long bRevertOnClose);ulFlags: The combination of any values, by using a bitwise OR operator, that are defined in the<strong>VDS</strong>_VOLUME_FLAG enumeration.bRevertOnClose: A Boolean that determines whether the flags should be temporarily set. Ifthey are temporarily set, <strong>VDS</strong>_VF_READONLY, <strong>VDS</strong>_VF_HIDDEN,<strong>VDS</strong>_VF_NO_DEFAULT_DRIVE_LETTER, and <strong>VDS</strong>_VF_SHADOW_COPY are the only valid flagsthat can be set, and the server reverts the flags after the client releases its last reference tothe volume object.Return Values: The method MUST return zero or a non-error HRESULT (as specified in [<strong>MS</strong>-ERREF]) to indicate success, or return an implementation-specific nonzero error code toindicate failure. For the HRESULT values predefined by the <strong>Virtual</strong> <strong>Disk</strong> <strong>Service</strong> Remote<strong>Protocol</strong>, see section 2.2.3.When the server receives this message, it MUST validate the following parameters:•Verify that ulFlags contains only those valid flags defined in the <strong>VDS</strong>_VOLUME_FLAGenumeration. If bRevertOnClose is set, then verify that ulFlags only contains<strong>VDS</strong>_VF_READONLY, <strong>VDS</strong>_VF_HIDDEN, <strong>VDS</strong>_VF_NO_DEFAULT_DRIVE_LETTER, and/or<strong>VDS</strong>_VF_SHADOW_COPY.•If bRevertOnClose is set, verify that the volume object does not have flags that were previouslyset with bRevertOnClose and are yet to be reverted on close.•If bRevertOnClose is not set:•Verify that the flags being set do not contain a flag that was previously set withbRevertOnClose and is yet to be reverted on close.•Verify that ulFlags only contains <strong>VDS</strong>_VF_HIDDEN, <strong>VDS</strong>_VF_READONLY,<strong>VDS</strong>_VF_NO_DEFAULT_DRIVE_LETTER, <strong>VDS</strong>_VF_SHADOW_COPY, and/or<strong>VDS</strong>_VF_INSTALLABLE.The server MUST perform the following:•If the ulFlags parameter specifies that the <strong>VDS</strong>_VF_READONLY or <strong>VDS</strong>_VF_HIDDEN flags be seton a volume located on an MBR disk, and that disk contains a critical volume, such as thesystem, boot, hibernation, page file, or crash dump volumes, then the server MUST fail thismethod and return <strong>VDS</strong>_E_OPERATION_DENIED.•Set the volume flags specified by ulFlags.•If bRevertOnClose is set, the server MUST be prepared to automatically revert the volume flagsif a client releases the last reference to the volume object.[<strong>MS</strong>-<strong>VDS</strong>] — v20110610<strong>Virtual</strong> <strong>Disk</strong> <strong>Service</strong> (<strong>VDS</strong>) <strong>Protocol</strong> <strong>Specification</strong>Copyright © 2011 Microsoft Corporation.Release: Friday, June 10, 2011245 / 360

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!