vm.go
func (v *VM) RemoveSharedFolder(guestpath string) error {
	var jobHandle C.VixHandle = C.VIX_INVALID_HANDLE
	var err C.VixError = C.VIX_OK

	gpath := C.CString(guestpath)
	defer C.free(unsafe.Pointer(gpath))

	jobHandle = C.VixVM_RemoveSharedFolder(v.handle,
		gpath,
		0,
		nil, nil)

	defer C.Vix_ReleaseHandle(jobHandle)

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

	return nil
}
func (v *VM) RemoveSharedFolder(guestpath string) error {
	var jobHandle C.VixHandle = C.VIX_INVALID_HANDLE
	var err C.VixError = C.VIX_OK

	gpath := C.CString(guestpath)
	defer C.free(unsafe.Pointer(gpath))

	jobHandle = C.VixVM_RemoveSharedFolder(v.handle,
		gpath,
		0,
		nil, nil)

	defer C.Vix_ReleaseHandle(jobHandle)

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

	return nil
}
// RemoveSharedFolder removes a shared folder in the virtual machine.
//
// Parameters:
//
//   guestpath: Specifies the guest pathname of the shared folder to delete.
//
// Remarks:
//
//   * This function removes a shared folder in the virtual machine referenced by
//     the VM object
//
//   * 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.
//
//   * Depending on the behavior of the guest operating system, when removing
//     shared folders, there might be a delay before the shared folder is no
//     longer visible to programs running within the guest operating system and
//     to functions such as Guest.IsFile()
//
// Since VMware Workstation 6.0
//