vm.go
func (v *VM) TotalSharedFolders() (int, error) {
	var jobHandle C.VixHandle = C.VIX_INVALID_HANDLE
	var err C.VixError = C.VIX_OK
	var numSharedFolders C.int

	jobHandle = C.VixVM_GetNumSharedFolders(v.handle, nil, nil)
	defer C.Vix_ReleaseHandle(jobHandle)

	err = C.get_num_shared_folders(jobHandle, &numSharedFolders)

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

	return int(numSharedFolders), nil
}
func (v *VM) TotalSharedFolders() (int, error) {
	var jobHandle C.VixHandle = C.VIX_INVALID_HANDLE
	var err C.VixError = C.VIX_OK
	var numSharedFolders C.int

	jobHandle = C.VixVM_GetNumSharedFolders(v.handle, nil, nil)
	defer C.Vix_ReleaseHandle(jobHandle)

	err = C.get_num_shared_folders(jobHandle, &numSharedFolders)

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

	return int(numSharedFolders), nil
}
// TotalSharedFolders returns the number of shared folders mounted in the virtual
// machine.
//
// Remarks:
//
//   * This function returns the number of shared folders mounted in the virtual
//     machine.
//
//   * It is not necessary to call VM.LoginInGuest() before calling this function.
//
//   * Shared folders are not supported for the following guest operating systems:
//     Windows ME, Windows 98, Windows 95, Windows 3.x, and DOS.
//
//   * In this release, this function requires the virtual machine to be powered
//     on with VMware Tools installed.
//
// Since VMware Workstation 6.0
//