IVssBackupComponents::QueryRevertStatus method (vsbackup.h)

The QueryRevertStatus method returns an IVssAsync interface pointer that can be used to determine the status of the revert operation.

Syntax

HRESULT QueryRevertStatus(
  [in]  VSS_PWSZ  pwszVolume,
  [out] IVssAsync **ppAsync
);

Parameters

[in] pwszVolume

Null-terminated wide character string containing the name of the volume. The name must be in one of the following formats and must include a trailing backslash (\):

  • The path of a mounted folder, for example, Y:\MountX\
  • A drive letter, for example, D:\
  • A volume GUID path of the form \\?\Volume{GUID}\ (where GUID identifies the volume)

[out] ppAsync

Pointer to a location that will receive an IVssAsync interface pointer that can be used to retrieve the status of the revert process. When the operation is complete, the caller must release the interface pointer by calling the IUnknown::Release method.

Return value

This method can return one of these values.

Value Meaning
S_OK
The operation was successful.
E_ACCESSDENIED
The calling process has insufficient privileges.
E_FAIL
There is an internal error.
E_INVALIDARG
One of the parameters passed is not valid.
E_NOTIMPL
The provider for the volume does not support revert operations.
E_OUTOFMEMORY
The caller is out of memory or other system resources.
E_POINTER
One of the required pointer parameters is NULL.
VSS_E_OBJECT_NOT_FOUND
The pwszVolume parameter is not a valid volume.
VSS_E_VOLUME_NOT_SUPPORTED
Revert is not supported on this volume.

Remarks

The revert operation will continue even if the computer is rebooted, and cannot be canceled or undone, except by restoring a backup created using another method. The QueryStatus method on the returned
IVssAsync interface cannot return VSS_S_ASYNC_CANCELLED as the revert operation cannot be canceled after it has started.

Requirements

Requirement Value
Minimum supported client Windows Vista with SP1 [desktop apps only]
Minimum supported server Windows Server 2008, Windows Server 2003 with SP1 [desktop apps only]
Target Platform Windows
Header vsbackup.h (include VsBackup.h, Vss.h, VsWriter.h)
Library VssApi.lib

See also

IVssAsync

IVssBackupComponents

IVssBackupComponents::RevertToSnapshot