Click or drag to resize
IVssBackupComponentsSetRestoreName Method
Assigns a new logical name to a component that is being restored.

Namespace: Alphaleonis.Win32.Vss
Assembly: AlphaVSS.Common (in AlphaVSS.Common.dll) Version: 1.3.0.0 (1.3.0.0)
Syntax
void SetRestoreName(
	Guid writerId,
	VssComponentType componentType,
	string logicalPath,
	string componentName,
	string restoreName
)

Parameters

writerId
Type: SystemGuid
The globally unique identifier (GUID) of the writer class.
componentType
Type: Alphaleonis.Win32.VssVssComponentType
The type of the component.
logicalPath
Type: SystemString

A string containing 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 the string that was used when the component was added.

The logical path can be .

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

componentName
Type: SystemString

The name of the component.

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

restoreName
Type: SystemString
String containing the restore name to be set for the component.
Exceptions
ExceptionCondition
ArgumentNullExceptionOne of the arguments that cannot be was
ArgumentExceptionOne of the parameter values is not valid.
OutOfMemoryExceptionOut of memory or other system resources.
SystemExceptionUnexpected VSS system error. The error code is logged in the event log.
VssBadStateExceptionThis method was not called during a restore operation.
VssObjectNotFoundExceptionThe specified component was not found.
Remarks

Note Note
Windows XP and Windows 2003: This method requires Windows Vista or Windows Server 2008.

See Also