Interface IVssInfoProvider
Provides access to global methods of the Win32 VSS API that allow querying for specific information.
Namespace: Alphaleonis.Win32.Vss
Assembly: AlphaVSS.Common.dll
Syntax
public interface IVssInfoProvider
Methods
| Improve this Doc View SourceGetSnapshotCompatibility(String)
Determines whether certain volume control or file I/O operations are disabled for the given volume if a shadow copy of it exists.
Declaration
VssSnapshotCompatibility GetSnapshotCompatibility(string volumeName)
Parameters
Type | Name | Description |
---|---|---|
String | volumeName | Name of the volume. The name of the volume to be checked must be in one of the following formats:
|
Returns
Type | Description |
---|---|
VssSnapshotCompatibility | A bit mask (or bitwise OR) of VssSnapshotCompatibility values that indicates whether certain volume control or file I/O operations are disabled for the given volume if a shadow copy of it exists. |
Remarks
Use IsVolumeSnapshotted(String) to determine whether a snapshot exists for the specified volume or not.
If no volume control or file I/O operations are disabled for the selected volume, then the shadow copy capability of the selected volume returned will None.
Exceptions
Type | Condition |
---|---|
ArgumentException | One of the parameters is not valid. |
UnauthorizedAccessException | The caller does not have sufficient backup privileges or is not an administrator. |
OutOfMemoryException | Out of memory or other system resources. |
SystemException | Unexpected VSS system error. The error code is logged in the event log. |
VssProviderVetoException | Expected provider error. The provider logged the error in the event log. |
VssObjectNotFoundException | The specified volume was not found. |
VssUnexpectedProviderErrorException | Unexpected provider error. The error code is logged in the event log file. |
See Also
| Improve this Doc View SourceIsVolumeSnapshotted(String)
The IsVolumeSnapshotted
function determines whether any shadow copies exist for the specified volume.
Declaration
bool IsVolumeSnapshotted(string volumeName)
Parameters
Type | Name | Description |
---|---|---|
String | volumeName | Name of the volume. The name of the volume to be checked must be in one of the following formats:
|
Returns
Type | Description |
---|---|
Boolean |
|
Remarks
Use GetSnapshotCompatibility(String) to determine whether certain volume control or file I/O operations are disabled for the given volume if a shadow copy of it exists.
Exceptions
Type | Condition |
---|---|
ArgumentException | One of the parameters is not valid. |
UnauthorizedAccessException | The caller does not have sufficient backup privileges or is not an administrator. |
OutOfMemoryException | Out of memory or other system resources. |
SystemException | Unexpected VSS system error. The error code is logged in the event log. |
VssProviderVetoException | Expected provider error. The provider logged the error in the event log. |
VssObjectNotFoundException | The specified volume was not found. |
VssUnexpectedProviderErrorException | Unexpected provider error. The error code is logged in the event log file. |
ShouldBlockRevert(String)
Checks the registry for writers that should block revert operations on the specified volume.
Declaration
bool ShouldBlockRevert(string volumeName)
Parameters
Type | Name | Description |
---|---|---|
String | volumeName | The name of the volume. The name must be in one of the following formats:
|
Returns
Type | Description |
---|---|
Boolean | true if the volume contains components from any writers that are listed in the registry as writers that should block revert operations; otherwise, false |