Click or drag to resize

IVssDifferentialSoftwareSnapshotManagementAddDiffArea Method

The AddDiffArea(String, String, Int64) method adds a shadow copy storage area association for the specified volume. If the association is not supported, an exception will be thrown.

Namespace:  Alphaleonis.Win32.Vss
Assembly:  AlphaVSS.Common (in AlphaVSS.Common.dll) Version: 1.4.0.0 (1.4.0.0)
Syntax
void AddDiffArea(
	string volumeName,
	string diffAreaVolumeName,
	long maximumDiffSpace
)

Parameters

volumeName
Type: SystemString

Name of the volume that will be the source of shadow copies that is to be associated with a shadow copy storage area on the volumeName volume.

The name of the volume 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 (\)

diffAreaVolumeName
Type: SystemString

Name of the volume that will contain the shadow copy storage area to be associated with the volumeName volume.

The name of the volume 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 (\)

maximumDiffSpace
Type: SystemInt64

Specifies the maximum size, in bytes, of the shadow copy storage area on the volume. This value must be at least 300 MB, up to the system-wide limit.

Windows Server 2003: Prior to Windows Server 2003 SP1 the shadow copy storage area size was fixed at 100 MB.

Exceptions
ExceptionCondition
UnauthorizedAccessExceptionCaller does not have sufficient backup privileges or is not an administrator.
OutOfMemoryExceptionThe caller is out of memory or other system resources.
ArgumentExceptionOne of the parameter values is not valid.
ArgumentNullExceptionOne of the arguments was
SystemExceptionUnexpected error. The error code is logged in the error log file.
VssObjectAlreadyExistsExceptionThe association between the volumeName and diffAreaVolumeName volumes already exists.
VssProviderVetoExceptionExpected provider error. The provider logged the error in the event log.
VssVolumeNotSupportedExceptionThe diffAreaVolumeName volume is not NTFS or has insufficient free space.
VssMaximumDiffAreaAssociationsReachedExceptionThe maximum number of shadow copy storage areas has been added to the shadow copy source volume. The specified shadow copy storage volume was not associated with the specified shadow copy source volume.
Remarks

Note Note

Windows XP: This method is not supported until Windows Server 2003.

See Also