|IVssBackupComponentsSetSelectedForRestore Method (Guid, VssComponentType, String, String, Boolean)|
void SetSelectedForRestore( Guid writerId, VssComponentType componentType, string logicalPath, string componentName, bool selectedForRestore )
Sub SetSelectedForRestore ( writerId As Guid, componentType As VssComponentType, logicalPath As String, componentName As String, selectedForRestore As Boolean )
void SetSelectedForRestore( Guid writerId, VssComponentType componentType, String^ logicalPath, String^ componentName, bool selectedForRestore )
The logical path of the component. For more information, see Logical Pathing of Components.
The value of the string containing the logical path used here should be the same as was used when the component was added to the backup set using AddComponent(Guid, Guid, VssComponentType, String, String).
The logical path can be .
There are no restrictions on the characters that can appear in a non-null logical path.
The name of the component.
The value of the string should not be , and should contain the same component as was used when the component was added to the backup set using AddComponent(Guid, Guid, VssComponentType, String, String).
|ArgumentNullException||One of the arguments that cannot be was|
|ArgumentException||One of the parameter values is not valid.|
|OutOfMemoryException||Out of memory or other system resources.|
|SystemException||Unexpected VSS system error. The error code is logged in the event log.|
|VssBadStateException||The backup components object is not initialized, this method has been called during a restore operation, or this method has not been called within the correct sequence.|
|VssObjectNotFoundException||The backup component does not exist.|
|VssInvalidXmlDocumentException||The XML document is not valid. Check the event log for details.|
SetSelectedForRestore has meaning only for restores taking place in component mode.
SetSelectedForRestore Overload can only be called for components that were explicitly added to the backup document at backup time using AddComponent(Guid, Guid, VssComponentType, String, String). Restoring a component that was implicitly selected for backup as part of a component set must be done by calling SetSelectedForRestore Overload on the closest ancestor component that was added to the document. If only this component's data is to be restored, that should be accomplished through AddRestoreSubcomponent(Guid, VssComponentType, String, String, String, String); this can only be done if the component is selectable for restore.
This method must be called before PreRestore.