Click or drag to resize
IVssBackupComponentsAddToSnapshotSet Method (String)
The AddToSnapshotSet(String) method adds an original volume to the shadow copy set using the default provider.

Namespace: Alphaleonis.Win32.Vss
Assembly: AlphaVSS.Common (in AlphaVSS.Common.dll) Version: 1.3.0.0 (1.3.0.0)
Syntax
Guid AddToSnapshotSet(
	string volumeName
)

Parameters

volumeName
Type: SystemString
String containing the name of the volume to be shadow copied. The name must be in one of the following formats:
  • The path of a volume mount point with a backslash (\)
  • A drive letter with backslash (\), for example, D:\
  • A unique volume name of the form "\\?\Volume{GUID}\" (where GUID is the unique global identifier of the volume) with a backslash (\)

Return Value

Type: Guid
Identifier of the added shadow copy.
Exceptions
ExceptionCondition
UnauthorizedAccessExceptionCaller does not have sufficient backup privileges or is not an administrator.
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.
VssMaximumNumberOfVolumesReachedExceptionThe maximum number of volumes has been added to the shadow copy set. The specified volume was not added to the shadow copy set.
VssMaximumNumberOfSnapshotsReachedExceptionThe volume has been added to the maximum number of shadow copy sets. The specified volume was not added to the shadow copy set.
VssObjectNotFoundExceptionvolumeName does not correspond to an existing volume.
VssProviderVetoExceptionExpected provider error. The provider logged the error in the event log.
VssVolumeNotSupportedExceptionNo VSS provider indicates that it supports the specified volume.
VssVolumeNotSupportedByProviderExceptionThe volume is not supported by the specified provider.
VssUnexpectedProviderErrorExceptionThe provider returned an unexpected error code.
Remarks

The maximum number of shadow copies in a single shadow copy set is 64.

See Also