Collapse All
Parallels Virtualization SDK
ContentsIndex
PreviousUpNext
PrlDisk_GetSnapshotsCount Function
PHT_VIRTUAL_DISK  See Also

Determines the number of snapshots of the specified virtual disk.

Syntax
PRL_RESULT PrlDisk_GetSnapshotsCount(
    const PRL_HANDLE Handle, 
    PRL_UINT32_PTR SnapshotsCount
);
File

PrlDisk.h

Parameters

Handle
A handle of type PHT_VIRTUAL_DISK identifying the virtual disk.
SnapshotsCount
[out] A pointer to a variable that receives the snapshot count.

Returns

PRL_RESULT. Possible values: 

PRL_ERR_INVALID_ARG - invalid argument values. 

PRL_ERR_SUCCESS - function completed successfully. 

Remarks

A virtual disk snapshot is created when a snapshot of a virtual machine is created or manually using the PrlDisk_CreateState function. Snapshots of a given virtual disk are organized into a tree. You can use the PrlDisk_GetSnapshotsTree function to obtain the entire tree and then, knowing the total snapshot count, traverse the tree. Each snapshot is identified using a universally unique ID (UUID). When you know the UUID of a snapshot of interest, you can revert to it or delete it if needed.

See Also
Links
© 2021 Parallels International GmbH. All rights reserved.