func (v *VM) TotalRootSnapshots() (int, error) {
	var result C.int
	var err C.VixError = C.VIX_OK

	err = C.VixVM_GetNumRootSnapshots(v.handle, &result)
	if C.VIX_OK != err {
		return 0, &Error{
			Operation: "vm.TotalRootSnapshots",
			Code:      int(err & 0xFFFF),
			Text:      C.GoString(C.Vix_GetErrorText(err, nil)),
		}
	}

	return int(result), nil
}
func (v *VM) TotalRootSnapshots() (int, error) {
	var result C.int
	var err C.VixError = C.VIX_OK

	err = C.VixVM_GetNumRootSnapshots(v.handle, &result)
	if C.VIX_OK != err {
		return 0, &Error{
			Operation: "vm.TotalRootSnapshots",
			Code:      int(err & 0xFFFF),
			Text:      C.GoString(C.Vix_GetErrorText(err, nil)),
		}
	}

	return int(result), nil
}
// TotalRootSnapshots returns the number of top-level (root) snapshots belonging to a
// virtual machine.
//
// Remarks:
//
//   * This function returns the number of top-level (root) snapshots belonging to
//     a virtual machine.
//     A top-level snapshot is one that is not based on any previous snapshot.
//     If the virtual machine has more than one snapshot, the snapshots can be a
//     sequence in which each snapshot is based on the previous one, leaving only
//     a single top-level snapshot.
//     However, if applications create branched trees of snapshots, a single
//     virtual machine can have several top-level snapshots.
//
//   * VMware Server can manage only a single snapshot for each virtual machine.
//     All other snapshots in a sequence are ignored. The return value is always
//     0 or 1.
//
//   * This function is not supported when using the VMWARE_PLAYER provider
//
// Since VMware Workstation 6.0
//