Name
VixSnapshot_GetChild
Description
VixError
VixSnapshot_GetChild(VixHandle parentSnapshotHandle,
int index,
VixHandle *childSnapshotHandle)
This
function
returns the specified child snapshot.
Parameters
- parentSnapshotHandle
-
A snapshot handle.
- index
-
Index into the list of snapshots.
- childSnapshotHandle
-
(output) A handle to the child snapshot.
Return Value
VixError
Remarks
- Snapshots are indexed from 0 to n-1, where n is the number of child
snapshots.
Use the function
VixSnapshot_GetNumChildren()
to get the
value of n.
- The snapshotHandle returned by this function is reference counted.
The calling application is responsible for releasing the handle.
- This function is not supported when using the
VIX_SERVICEPROVIDER_VMWARE_PLAYER
host type.
Side Effects
None.
Requirements
vix.h, since VMware Workstation 6.0
Example
VixHandle parentSnapshot;
VixHandle childSnapshot;
int numChildren;
VixError err;
int i;
err = VixSnapshot_GetNumChildren(parentSnapshotHandle, &numChildren);
printf("the snapshot has %d child snapshots\n", numChildren);
for (i = 0; i < numChildren; i++) {
err = VixSnapshot_GetChild(parentSnapshotHandle, i, &childSnapshot);
}