IVssComponent Class

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
Some information in the IVssComponent object is on a per-file basis and can refer to files managed either by explicitly selected components or by implicitly selected subcomponents:
  • Alternate location mappings
  • Partial files
  • Directed target
Other information is not included in the Backup Components Document and can be inferred using the IVssComponent object in conjunction with the appropriate Writer Metadata Documents based on a writer's component hierarchy expressed in the logical paths (see Working with Selectability and Logical Paths).

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:

Methods

The IVssComponent class has these methods.

Method Description
IVssComponent::AddDifferencedFilesByLastModifyLSN Not supported.
IVssComponent::AddDifferencedFilesByLastModifyTime 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.
IVssComponent::AddDirectedTarget 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.
IVssComponent::AddPartialFile The AddPartialFile method indicates that only portions of a given file are to be backed up and which portions those are.
IVssComponent::GetAdditionalRestores 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.
IVssComponent::GetAlternateLocationMapping 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.
IVssComponent::GetAlternateLocationMappingCount 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.
IVssComponent::GetBackupMetadata The GetBackupMetadata method retrieves private, writer-specific backup metadata that might have been set during a PrepareForBackup event by CVssWriter::OnPrepareBackup using IVssComponent::SetBackupMetadata.
IVssComponent::GetBackupOptions 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.
IVssComponent::GetBackupStamp The GetBackupStamp method returns the backup stamp string stored by a writer for a given component.
IVssComponent::GetBackupSucceeded 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.
IVssComponent::GetComponentName The GetComponentName method returns the logical name of this component.
IVssComponent::GetComponentType The GetComponentType method returns the type of this component in terms of the VSS_COMPONENT_TYPE enumeration.
IVssComponent::GetDifferencedFile 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).
IVssComponent::GetDifferencedFilesCount 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.
IVssComponent::GetDirectedTarget 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.
IVssComponent::GetDirectedTargetCount 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.
IVssComponent::GetFileRestoreStatus 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.
IVssComponent::GetLogicalPath The GetLogicalPath method returns the logical path of this component.
IVssComponent::GetNewTarget The GetNewTarget method returns the new file restoration locations for the selected component or component set.
IVssComponent::GetNewTargetCount The GetNewTargetCount method returns the number of new target restore locations associated with a given component.
IVssComponent::GetPartialFile The GetPartialFile method returns information on a partial file associated with this component.
IVssComponent::GetPartialFileCount The GetPartialFileCount method returns the number of partial files associated with a component.
IVssComponent::GetPostRestoreFailureMsg The GetPostRestoreFailureMsg method returns the failure message generated by a writer while handling the PostRestore event, if IVssComponent::SetPostRestoreFailureMsg set one.
IVssComponent::GetPreRestoreFailureMsg The GetPreRestoreFailureMsg method retrieves the error message generated by a writer while handling the PreRestore event, if IVssComponent::SetPreRestoreFailureMsg set one.
IVssComponent::GetPreviousBackupStamp 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.
IVssComponent::GetRestoreMetadata The GetRestoreMetadata method retrieves private, writer-specific restore metadata that might have been set during a PreRestore event by CVssWriter::OnPreRestore using IVssComponent::SetRestoreMetadata.
IVssComponent::GetRestoreOptions The GetRestoreOptions method gets the restore options specified to the current writer by a requester using IVssBackupComponents::SetRestoreOptions.
IVssComponent::GetRestoreSubcomponent The GetRestoreSubcomponent method returns the specified subcomponent associated with a given component.
IVssComponent::GetRestoreSubcomponentCount The GetRestoreSubcomponentCount method returns the number of subcomponents associated with a component.
IVssComponent::GetRestoreTarget The GetRestoreTarget method returns the restore target (in terms of the VSS_RESTORE_TARGET enumeration) for the current component.
IVssComponent::IsSelectedForRestore The IsSelectedForRestore method determines whether the current component has been selected to be restored.
IVssComponent::SetBackupMetadata The SetBackupMetadata method sets backup metadata with the component.
IVssComponent::SetBackupStamp The SetBackupStamp method sets a string containing information indicating when a backup took place.
IVssComponent::SetPostRestoreFailureMsg The SetPostRestoreFailureMsg method is used to create a message describing a failure in processing a PostRestore event.
IVssComponent::SetPreRestoreFailureMsg The SetPreRestoreFailureMsg method is used to create a message describing a failure in processing a PreRestore event.
IVssComponent::SetRestoreMetadata The SetRestoreMetadata method sets writer-specific metadata for the current component.
IVssComponent::SetRestoreTarget The SetRestoreTarget method sets the restore target (in terms of the VSS_RESTORE_TARGET enumeration) for the current component.

Requirements

   
Minimum supported client Windows XP [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Target Platform Windows
Header vswriter.h (include Vss.h, VsWriter.h)