IVssFileShareSnapshotProvider::SetSnapshotProperty method (vsprov.h)

Requests the provider to set a property value for the specified snapshot.

Syntax

HRESULT SetSnapshotProperty(
  [in] VSS_ID                   SnapshotId,
  [in] VSS_SNAPSHOT_PROPERTY_ID eSnapshotPropertyId,
  [in] VARIANT                  vProperty
);

Parameters

[in] SnapshotId

Shadow copy identifier. This parameter is required and cannot be GUID_NULL.

[in] eSnapshotPropertyId

A VSS_SNAPSHOT_PROPERTY_ID value that specifies the property to be set for the shadow copy.

[in] vProperty

The value to be set for the property. See the VSS_SNAPSHOT_PROP structure for valid data types and descriptions of the properties that can be set for a shadow copy.

Return value

The following are the valid return codes for this method.

Value Meaning
S_OK
The property was set successfully.
E_ACCESSDENIED
The caller does not have sufficient backup privileges or is not an administrator.
E_INVALIDARG
One of the parameter values is not valid.
E_OUTOFMEMORY
The caller is out of memory or other system resources.
VSS_E_OBJECT_NOT_FOUND
The specified shadow copy was not found.

Requirements

Requirement Value
Minimum supported client Windows 8.1 [desktop apps only]
Minimum supported server Windows Server 2012 R2 [desktop apps only]
Target Platform Windows
Header vsprov.h
Library VssApi.lib

See also

IVssFileShareSnapshotProvider