IVssComponent class (vswriter.h)
The IVssComponent interface is a C++ (not COM) interface containing methods for examining and modifying information about components contained in a requester's Backup Components Document.
IVssComponent objects can be obtained only for those components that have been explicitly added to the Backup Components Document during a backup operation by the IVssBackupComponents::AddComponent method.
Information about components explicitly added during a restore operation using IVssBackupComponents::AddRestoreSubcomponent are not available through the IVssComponent interface.
Some information common to both components and implicitly selected subcomponents available through IVssComponent objects includes the following:
- Backup time stamp
- Pre-/post-restore Failure Messages
- Restore metadata
- Restore target
- Alternate location mappings
- Partial files
- Directed target
The interface can be used by either a writer or a requester, although certain methods are supported only for writers. In this way, a writer can request changes in a backup or restore operation, such as adding a new target, or learn of requester actions, such as the use of an alternate location.
The following methods return an IVssComponent interface:
The IVssComponent interface inherits from the IUnknown interface. IVssComponent also has these types of members:
The IVssComponent class has these methods.
Not supported. (IVssComponent.AddDifferencedFilesByLastModifyLSN)
Used by a writer to indicate that a file set (a specified file or files) should be evaluated against a last modification time stamp for inclusion in a time stamped incremental or differential backup using entire files.
The AddDirectedTarget method allows a writer to indicate at restore time that when a file is to be restored, it (the source file) should be remapped.
The AddPartialFile method indicates that only portions of a given file are to be backed up and which portions those are.
The GetAdditionalRestores method is used by a writer during incremental or differential restore operations to determine whether a given component will require additional restore operations to completely retrieve it.
The GetAlternateLocationMapping is used to return a file set's alternate location for file restoration. This method can be called by either a writer or a requester.
The GetAlternateLocationMappingCount method returns the number of alternate location mappings used by a requester in restoring data. Either a writer or a requester can call this method.
The GetBackupMetadata method retrieves private, writer-specific backup metadata that might have been set during a PrepareForBackup event by CVssWriter::OnPrepareBackup using IVssComponent::SetBackupMetadata.
The GetBackupOptions method returns the backup options specified to the writer that manages the currently selected component or component set by a requester using IVssBackupComponents::SetBackupOptions.
The GetBackupStamp method returns the backup stamp string stored by a writer for a given component.
The GetBackupSucceeded method returns the status of a complete attempt at backing up all the files of a selected component or component set as a VSS_FILE_RESTORE_STATUS enumeration.
The GetComponentName method returns the logical name of this component.
The GetComponentType method returns the type of this component in terms of the VSS_COMPONENT_TYPE enumeration.
The GetDifferencedFile method returns information about a file set (a specified file or files) to participate in an incremental or differential backup or restore as a differenced file that is, backup and restores associated with it are to be implemented as if entire files are copied to and from backup media (as opposed to using partial files).
Returns the number of file specifications in this component (and in any subcomponents of the component set it defines) marked by a writer supporting an incremental backup or restore as differenced files.
The GetDirectedTarget method returns information stored by a writer, at backup time, to the Backup Components Document to indicate that when a file is to be restored, it (the source file) should be remapped.
The GetDirectedTargetCount method returns the number of directed target specifications associated with the current component. Either a writer or a requester can call this method.
The GetFileRestoreStatus method returns the status of a completed attempt to restore all the files of a selected component or component set as a VSS_FILE_RESTORE_STATUS enumeration.
The GetLogicalPath method returns the logical path of this component.
The GetNewTarget method returns the new file restoration locations for the selected component or component set.
The GetNewTargetCount method returns the number of new target restore locations associated with a given component.
The GetPartialFile method returns information on a partial file associated with this component.
The GetPartialFileCount method returns the number of partial files associated with a component.
The GetPostRestoreFailureMsg method returns the failure message generated by a writer while handling the PostRestore event, if IVssComponent::SetPostRestoreFailureMsg set one.
The GetPreRestoreFailureMsg method retrieves the error message generated by a writer while handling the PreRestore event, if IVssComponent::SetPreRestoreFailureMsg set one.
The GetPreviousBackupStamp method returns a previous backup stamp loaded by a requester in the Backup Components Document. The value is used by a writer when deciding if files should participate in differential or incremental backup operation.
The GetRestoreMetadata method retrieves private, writer-specific restore metadata that might have been set during a PreRestore event by CVssWriter::OnPreRestore using IVssComponent::SetRestoreMetadata.
The GetRestoreOptions method gets the restore options specified to the current writer by a requester using IVssBackupComponents::SetRestoreOptions.
The GetRestoreSubcomponent method returns the specified subcomponent associated with a given component.
The GetRestoreSubcomponentCount method returns the number of subcomponents associated with a component.
The GetRestoreTarget method returns the restore target (in terms of the VSS_RESTORE_TARGET enumeration) for the current component.
The IsSelectedForRestore method determines whether the current component has been selected to be restored.
The SetBackupMetadata method sets backup metadata with the component.
The SetBackupStamp method sets a string containing information indicating when a backup took place.
The SetPostRestoreFailureMsg method is used to create a message describing a failure in processing a PostRestore event.
The SetPreRestoreFailureMsg method is used to create a message describing a failure in processing a PreRestore event.
The SetRestoreMetadata method sets writer-specific metadata for the current component.
The SetRestoreTarget method sets the restore target (in terms of the VSS_RESTORE_TARGET enumeration) for the current component.
|Minimum supported client||Windows XP [desktop apps only]|
|Minimum supported server||Windows Server 2003 [desktop apps only]|
|Header||vswriter.h (include Vss.h, VsWriter.h)|