IVdsDiskOnline::Offline method

[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.


HRESULT Offline(



This method has no parameters.

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.


If a dynamic disk is read/write and online, it can be made read-only and taken offline as follows:

  1. For each volume on the disk, call the IVdsVolumeMF::Dismount method, setting the bForce and bPermanent parameters to TRUE.
  2. Call the Offline method.
  3. Set the read-only bit. (This is the VDS_DF_READ_ONLY flag in the VDS_DISK_PROP structure.)
If a basic disk is read/write and online, it can be made read-only and taken offline the same way, but the order of the steps does not matter.


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

See Also