Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
[Beginning with Windows 8 and Windows Server 2012, the Virtual Disk Service COM interface is superseded by the Windows Storage Management API.]
Takes the disk offline.Windows Vista: This method is not supported until Windows Vista with Service Pack 1 (SP1). Use IVdsDisk2::SetSANMode instead.
Syntax
HRESULT Offline();
Return value
This method can return standard HRESULT values, such as E_INVALIDARG or E_OUTOFMEMORY, and VDS-specific return values. It can also return converted system error codes using the HRESULT_FROM_WIN32 macro. Errors can originate from VDS itself or from the underlying VDS provider that is being used. Possible return values include the following.
| Return code | Description |
|---|---|
|
The offline operation failed. |
Remarks
If a dynamic disk is read/write and online, it can be made read-only and taken offline as follows:
- For each volume on the disk, call the IVdsVolumeMF::Dismount method, setting the bForce and bPermanent parameters to TRUE.
- Call the Offline method.
- Set the read-only bit. (This is the VDS_DF_READ_ONLY flag in the VDS_DISK_PROP structure.)
Requirements
| Requirement | Value |
|---|---|
| Minimum supported client | Windows Vista with SP1 [desktop apps only] |
| Minimum supported server | Windows Server 2008 [desktop apps only] |
| Target Platform | Windows |
| Header | vds.h |
| Library | Uuid.lib |