Skip to content

Latest commit

 

History

History
170 lines (142 loc) · 5.33 KB

nf-vsmgmt-ivssdifferentialsoftwaresnapshotmgmt3-setvolumeprotectlevel.md

File metadata and controls

170 lines (142 loc) · 5.33 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NF:vsmgmt.IVssDifferentialSoftwareSnapshotMgmt3.SetVolumeProtectLevel
IVssDifferentialSoftwareSnapshotMgmt3::SetVolumeProtectLevel (vsmgmt.h)
Sets the shadow copy protection level for an original volume or a shadow copy storage area volume.
IVssDifferentialSoftwareSnapshotMgmt3 interface
SetVolumeProtectLevel method
IVssDifferentialSoftwareSnapshotMgmt3.SetVolumeProtectLevel
IVssDifferentialSoftwareSnapshotMgmt3::SetVolumeProtectLevel
SetVolumeProtectLevel
SetVolumeProtectLevel method
SetVolumeProtectLevel method
IVssDifferentialSoftwareSnapshotMgmt3 interface
base.ivssdifferentialsoftwaresnapshotmgmt3_setvolumeprotectlevel
vsmgmt/IVssDifferentialSoftwareSnapshotMgmt3::SetVolumeProtectLevel
base\ivssdifferentialsoftwaresnapshotmgmt3_setvolumeprotectlevel.htm
base
3f8f3a0c-5076-4ce3-aa8b-5c66ac5fa47a
12/05/2018
IVssDifferentialSoftwareSnapshotMgmt3 interface,SetVolumeProtectLevel method, IVssDifferentialSoftwareSnapshotMgmt3.SetVolumeProtectLevel, IVssDifferentialSoftwareSnapshotMgmt3::SetVolumeProtectLevel, SetVolumeProtectLevel, SetVolumeProtectLevel method, SetVolumeProtectLevel method,IVssDifferentialSoftwareSnapshotMgmt3 interface, base.ivssdifferentialsoftwaresnapshotmgmt3_setvolumeprotectlevel, vsmgmt/IVssDifferentialSoftwareSnapshotMgmt3::SetVolumeProtectLevel
vsmgmt.h
Windows
None supported
Windows Server 2008 [desktop apps only]
Windows
19H1
IVssDifferentialSoftwareSnapshotMgmt3::SetVolumeProtectLevel
vsmgmt/IVssDifferentialSoftwareSnapshotMgmt3::SetVolumeProtectLevel
c++
APIRef
kbSyntax
COM
VsMgmt.h
IVssDifferentialSoftwareSnapshotMgmt3.SetVolumeProtectLevel

IVssDifferentialSoftwareSnapshotMgmt3::SetVolumeProtectLevel

-description

Sets the shadow copy protection level for an original volume or a shadow copy storage area volume.

-parameters

-param pwszVolumeName [in]

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)

-param protectionLevel [in]

A value from the VSS_PROTECTION_LEVEL enumeration that specifies the shadow copy protection level.

-returns

The following are the valid return codes for this method.

Value Meaning
S_OK
The shadow copy protection level was set successfully.
E_ACCESSDENIED
0x80070005L
The caller is not an administrator.
E_INVALIDARG
0x80070057L
One of the parameter values is not valid.
E_NOTIMPL
0x80000001L
The provider for the volume does not support shadow copy protection.
VSS_E_PROVIDER_VETO
0x80042306L
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.
VSS_E_OBJECT_NOT_FOUND
0x80042308L
The specified volume was not found.

-remarks

The SetVolumeProtectLevel method checks the current shadow copy protection level of the volume. If the volume is in a faulted state and VSS_PROTECTION_LEVEL_ORIGINAL_VOLUME is specified for the protectionLevel parameter, SetVolumeProtectLevel dismounts the volume before setting the protection level.

If the current protection level of the volume is the same as the value of the protectionLevel parameter, SetVolumeProtectLevel does nothing.

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.

-see-also

IVssDifferentialSoftwareSnapshotMgmt3

IVssDifferentialSoftwareSnapshotMgmt3::GetVolumeProtectLevel