IVssDifferentialSoftwareSnapshotMgmt3::GetVolumeProtectLevel method (vsmgmt.h)
Gets the shadow copy protection level and status for the specified volume.
Syntax
HRESULT GetVolumeProtectLevel(
[in] VSS_PWSZ pwszVolumeName,
[out] VSS_VOLUME_PROTECTION_INFO *protectionLevel
);
Parameters
[in] pwszVolumeName
The name of the volume. This parameter is required and cannot be NULL.
The name must be in one of the following formats and must include a trailing backslash (\):
- The path of a mounted folder, for example, Y:\MountX\
- A drive letter, for example, D:\
- A volume GUID path in the form \\?\Volume{GUID}\ (where GUID identifies the volume)
[out] protectionLevel
The address of a caller-allocated buffer that receives a VSS_VOLUME_PROTECTION_INFO structure containing information about the volume's shadow copy protection level.
Return value
The following are the valid return codes for this method.
Value | Meaning |
---|---|
|
The shadow copy protection level was queried successfully. |
|
The caller is not an administrator. |
|
One of the parameter values is not valid. |
|
The provider for the volume does not support shadow copy protection. |
|
An expected provider error has occurred. The error code is logged in the event log. For more information, see Event and Error Handling Under VSS. |
|
The specified volume was not found. |
Remarks
The GetVolumeProtectLevel method gets information about the volume's current protection level. If the volume is in a faulted state, the m_protectionFault member of the VSS_VOLUME_PROTECTION_INFO structure contains the current protection fault, and the m_failureStatus member contains the reason why the volume is in a faulted state. If the volume is not in a faulted state, the m_protectionFault and m_failureStatus members will be zero.
If the value of the protectionLevel parameter is VSS_PROTECTION_LEVEL_SNAPSHOT, requesters must set shadow copy storage area (diff area) associations using the IVssDifferentialSoftwareSnapshotMgmt::AddDiffArea method.
Requirements
Requirement | Value |
---|---|
Minimum supported client | None supported |
Minimum supported server | Windows Server 2008 [desktop apps only] |
Target Platform | Windows |
Header | vsmgmt.h |
See also
IVssDifferentialSoftwareSnapshotMgmt3
IVssDifferentialSoftwareSnapshotMgmt3::SetVolumeProtectLevel