Anteckning
Åtkomst till den här sidan kräver auktorisering. Du kan prova att logga in eller ändra kataloger.
Åtkomst till den här sidan kräver auktorisering. Du kan prova att ändra kataloger.
Deletes specific snapshots, or all snapshots in a specified snapshot set.
Syntax
HRESULT DeleteSnapshots(
[in] VSS_ID SourceObjectId,
[in] VSS_OBJECT_TYPE eSourceObjectType,
[in] BOOL bForceDelete,
[out] LONG *plDeletedSnapshots,
[out] VSS_ID *pNondeletedSnapshotID
);
Parameters
[in] SourceObjectId
Identifier of the shadow copy or shadow copy set to be deleted.
[in] eSourceObjectType
Type of the object to be deleted. The value of this parameter is VSS_OBJECT_SNAPSHOT or VSS_OBJECT_SNAPSHOT_SET.
[in] bForceDelete
If the value of this parameter is TRUE, the provider will do everything possible to delete the shadow copy or shadow copies in a shadow copy set. If it is FALSE, no additional effort will be made.
[out] plDeletedSnapshots
Pointer to a variable that receives the number of shadow copies that were deleted.
[out] pNondeletedSnapshotID
If an error occurs, this parameter receives a pointer to the identifier of the first shadow copy that could not be deleted. Otherwise, it points to GUID_NULL.
Return value
The following are the valid return codes for this method.
Value | Meaning |
---|---|
|
The shadow copies were successfully deleted. |
|
The caller does not have sufficient backup privileges or is not an administrator. |
|
One of the parameter values is not valid. |
|
The caller is out of memory or other system resources. |
|
The specified shadow copies were not found. |
|
Provider error. The provider logged the error in the event log. For more information, see Event and Error Handling Under VSS. |
Remarks
The VSS coordinator calls this method as part of the snapshot auto-release process. The method is also called in response to requester driven delete operations.
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 |