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.
The GetRestoreType method returns the type of restore a writer is participating in.
GetRestoreType is a protected method implemented by the CVssWriter base class.
Syntax
VSS_RESTORE_TYPE GetRestoreType();
Return value
This method returns the type of restore operation a writer is participating in, in terms of values of the VSS_RESTORE_TYPE enumeration.
If GetRestoreType is called during a backup operation, the return value is undefined.
Remarks
This method should be called only during restore operations.
The default restore type is VSS_RTYPE_UNDEFINED. However, writers should treat this restore type as if it were VSS_RTYPE_BY_COPY.
A requester can set the restore type by calling the IVssBackupComponents::SetRestoreState method.
A requester can call IVssBackupComponents::SetRestoreState anytime prior to its generation of a PreRestore event with the IVssBackupComponents::PreRestore method. Therefore, to obtain the correct restore type, a writer should not call GetRestoreType prior to handling the PreRestore event in CVssWriter::OnPreRestore.
Requirements
| Requirement | Value |
|---|---|
| Minimum supported client | Windows Vista [desktop apps only] |
| Minimum supported server | Windows Server 2003 [desktop apps only] |
| Target Platform | Windows |
| Header | vswriter.h (include Vss.h, VsWriter.h) |
| Library | VssApi.lib |
See also
IVssBackupComponents::PreRestore