IVssBackupComponents::RevertToSnapshot method (vsbackup.h)
The RevertToSnapshot method reverts a volume to a previous shadow copy. Only shadow copies created with persistent contexts (VSS_CTX_APP_ROLLBACK, VSS_CTX_CLIENT_ACCESSIBLE, VSS_CTX_CLIENT_ACCESSIBLE_WRITERS, or VSS_CTX_NAS_ROLLBACK) are supported.
HRESULT RevertToSnapshot( VSS_ID SnapshotId, BOOL bForceDismount );
VSS_ID of the shadow copy to revert.
If this parameter is TRUE, the volume will be dismounted and reverted even if the volume is in use.
This method can return one of these values.
||The operation was successful.|
||The calling process has insufficient privileges.|
||There is an internal error.|
||One of the parameters passed is not valid.|
||The provider for the volume does not support revert operations.|
||The caller is out of memory or other system resources.|
||The SnapshotId parameter is not a valid shadow copy.|
||The provider was not found.|
||The volume already has a revert in process.|
||Revert is only supported for persistent shadow copies.|
||The bForceDismount parameter was FALSE, and the volume could not be locked.|
||Revert is not supported on this volume.|
This operation cannot be canceled, or undone once completed. If the computer is rebooted during the revert operation, the revert process will continue when the system is restarted.
|Minimum supported client||None supported|
|Minimum supported server||Windows Server 2008, Windows Server 2003 with SP1 [desktop apps only]|
|Header||vsbackup.h (include VsBackup.h, Vss.h, VsWriter.h)|