3.4.5.2.32.11 IVdsVolume::ClearFlags (Opnum 13)
The ClearFlags method clears flags from a volume.<124>
-
HRESULT ClearFlags( [in] unsigned long ulFlags );
ulFlags: The combination of any values, by using the bitwise OR operator, that are defined in the VDS_VOLUME_FLAG enumeration.<125>
Return Values: The method MUST return zero or a non-error HRESULT (as specified in [MS-ERREF]) to indicate success, or return an implementation-specific nonzero error code to indicate failure. For the HRESULT values predefined by the Virtual Disk Service Remote Protocol, see section 2.2.3.
When the server receives this message, it MUST validate the following parameters:
Verify that ulFlags contains only valid flags defined in the VDS_VOLUME_FLAG enumeration.
If volume flags were set previously by calling SetFlags with bRevertOnClose set, and those flags have not yet been reverted, verify that the flags that ulFlags specifies are exactly the same as the flags set by a call to SetFlags.
The server MUST perform the following:
Clear the volume flags that ulFlags specifies. If the flags being cleared were set temporarily by calling SetFlags with bRevertOnClose set, and those flags had not yet been reverted, the server SHOULD NOT revert the flags automatically when a client releases the last reference to the volume object or dismounts the volume.
For each callback object that is registered in the list of callback objects, call the IVdsAdviseSink::OnNotify() method of the callback object by using a VDS_NOTIFICATION structure that has the following attributes:
objectType member is VDS_NTT_VOLUME.
Volume member is a VDS_VOLUME_NOTIFICATION that has the following attributes:
ulEvent is VDS_NF_VOLUME_MODIFY.
volumeId is the VDS_OBJECT_ID of this volume object.
plexId is NULL GUID, but it is not relevant when ulEvent is VDS_NF_VOLUME_MODIFY.
ulPercentCompleted range is 0-100 and is implementation-specific; however, it is not relevant when ulEvent is VDS_NF_VOLUME_MODIFY.
Return an HRESULT indicating failure or success.