Click or drag to resize

IVssBackupComponentsAddRestoreSubcomponent Method

The AddRestoreSubcomponent method indicates that a Subcomponent member of a component set, which had been marked as nonselectable for backup but is marked selectable for restore, is to be restored irrespective of whether any other member of the component set will be restored.

Namespace:  Alphaleonis.Win32.Vss
Assembly:  AlphaVSS.Common (in AlphaVSS.Common.dll) Version: 1.4.0.0 (1.4.0.0)
Syntax
void AddRestoreSubcomponent(
	Guid writerId,
	VssComponentType componentType,
	string logicalPath,
	string componentName,
	string subcomponentLogicalPath,
	string subcomponentName
)

Parameters

writerId
Type: SystemGuid
Globally unique identifier (GUID) of the writer class containing the files that are to receive a new target.
componentType
Type: Alphaleonis.Win32.VssVssComponentType
Identifies the type of the component, see the documentation for VssComponentType for more information.
logicalPath
Type: SystemString

String containing the logical path of the component in the backup document that defines the backup component set containing the Subcomponent to be added for restore.

The logical path can be .

There are no restrictions on the characters that can appear in a non-null logical path.

componentName
Type: SystemString

The logical path of the component in the backup document that defines the backup component set containing the Subcomponent to be added for restore.

The string should not be and should contain the same component name as was used when the component was added to the backup set using AddComponent(Guid, Guid, VssComponentType, String, String).

There are no restrictions on the characters that can appear in a non-NULL component name.

subcomponentLogicalPath
Type: SystemString

The logical path of the Subcomponent to be added for restore.

A logical path is required when adding a Subcomponent. Therefore, the value of this parameter cannot be .

There are no restrictions on the characters that can appear in a non-NULL logical path.

subcomponentName
Type: SystemString

The logical name of the Subcomponent to be added for restore.

The value of this parameter cannot be .

There are no restrictions on the characters that can appear in a non-NULL component name.

Exceptions
ExceptionCondition
ArgumentExceptionOne of the parameters is not valid.
OutOfMemoryExceptionOut of memory or other system resources.
SystemExceptionUnexpected VSS system error. The error code is logged in the event log.
VssBadStateExceptionThe 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.
VssObjectNotFoundExceptionThe component does not exist.
VssInvalidXmlDocumentExceptionThe XML document is not valid. Check the event log for details.
See Also