Click or drag to resize

IVssDifferentialSoftwareSnapshotManagementGetVolumeProtectionLevel Method

Gets the shadow copy protection level and status for the specified volume.

Namespace:  Alphaleonis.Win32.Vss
Assembly:  AlphaVSS.Common (in AlphaVSS.Common.dll) Version: 1.4.0.0 (1.4.0.0)
Syntax
VssVolumeProtectionInfo GetVolumeProtectionLevel(
	string volumeName
)

Parameters

volumeName
Type: SystemString

The name of the volume. This parameter is required and cannot be .

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 (\)

Return Value

Type: VssVolumeProtectionInfo
A VssVolumeProtectionInfo class instance that contains information about the volume's shadow copy protection level.
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
NotImplementedExceptionThe provider for the volume does not support shadow copy protection.
VssProviderVetoExceptionExpected provider error. The provider logged the error in the event log.
VssObjectNotFoundExceptionThe specified volume was not found.
Remarks

The GetVolumeProtectionLevel(String) method gets information about the volume's current protection level. If the volume is in a faulted state, the ProtectionFault member of the VssVolumeProtectionInfo structure contains the current protection fault, and the FailureStatus member contains the reason why the volume is in a faulted state. If the volume is not in a faulted state, the ProtectionFault and FailureStatus members will be zero.

See Also