Windows Dev Center

CVssWriter class

The CVssWriter class is an abstract base class that defines the interface by which a writer synchronizes its state with VSS and other writers.

Every writer must instantiate an object derived from CVssWriter.

Objects derived from CVssWriter must supply implementations for all of the CVssWriter's pure virtual methods.

A writer can override one or all of CVssWriter's virtual methods.

To participate in VSS, a writer must first call CVssWriter::Initialize and then call CVssWriter::Subscribe.

A writer terminates its participation by calling CVssWriter::Unsubscribe.

The CVssWriter base class is responsible for the life cycle of interfaces passed to event handlers. This includes the following:

CVssWriter has these types of members:

Protected Methods

NameDescription
AreComponentsSelected Indicates whether a requester supports selecting individual components to be backed up or backs up entire volumes.
GetBackupType Indicates the type of backup to be performed.
GetContext Returns the context of the current shadow copy operation.
GetCurrentLevel Returns the current application level.
GetCurrentSnapshotSetId Returns the unique identifier of the current shadow copy set.
GetCurrentVolumeArray Returns an array of the names of the original volumes belonging to the shadow copy set.
GetCurrentVolumeCount Returns the number of volumes in the shadow copy set.
GetRestoreType During file restoration, indicates the type of restore under way.
GetSnapshotDeviceName Returns the volume name of the shadow copy of the specified volume.
IsBootableStateBackedUp Indicates whether the bootable state will be backed up.
IsPartialFileSupportEnabled Indicates if partial file support is enabled or disabled.
IsPathAffected Indicates whether a specific directory or file is included in the current shadow copy set.
SetWriterFailure Method used by a writer to set an error code when it encounters a problem with participating in a VSS operation.

 

Pure Virtual Methods

NameDescription
OnAbort Writer-implemented method called in response to the Abort event.
OnFreeze Writer-implemented method called in response to a Freeze event.
OnPrepareSnapshot Writer-implemented method called in response to the PrepareForSnapshot event.
OnThaw Writer-implemented method called in response to the Thaw event.

 

Virtual Methods

NameDescription
~CVssWriter Destructor for the CVssWriter class object.
OnBackupComplete Writer-overridable method called during the BackupComplete event.
OnBackupShutdown Writer-overridable method called during the BackupShutdown event.
OnIdentify Writer-overridable method called during the Identify event.
OnPostRestore Writer-overridable method called during the PostRestore event.
OnPostSnapshot Writer-overridable method called during the PostSnapshot event.
OnPrepareBackup Writer-overridable method called during the PrepareForBackup event.
OnPreRestore Writer-overridable method called during the PreRestore event.
OnBackOffIOOnVolume This method is reserved for future use.
OnContinueIOOnVolume This method is reserved for future use.
OnVSSApplicationStartup This method is reserved for future use.
OnVssShutdown This method is reserved for future use.

 

Public Methods

NameDescription
CVssWriter Constructor for the CVssWriter class object.
Initialize Initializes a CVssWriter object and allows a writer application to interact with VSS.
Subscribe Subscribes the writer to VSS.
Unsubscribe Unsubscribes the writer from VSS.
InstallAlternateWriter This method is reserved for future use.

 

Requirements

Minimum supported client

Windows XP [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

Header

VsWriter.h (include Vss.h or VsWriter.h)

Library

VssApi.lib

 

 

Community Additions

ADD
Show:
© 2015 Microsoft