func (progress *Progress) Release() error {
  if progress.cprogress != nil {
    result := C.GoVboxIProgressRelease(progress.cprogress)
    if C.GoVboxFAILED(result) != 0 {
      return errors.New(fmt.Sprintf("Failed to release IProgress: %x", result))
    }
    progress.cprogress = nil
  }
  return nil
}
Release frees up the associated VirtualBox data.
After the call, this instance is invalid, and using it will cause errors.
It returns any error encountered.
package vbox
import "C"   
import (
  "errors"
  "fmt"
)
type Progress struct {
  cprogress *C.IProgress
}
func (progress* Progress) WaitForCompletion(timeout int) error {
  result := C.GoVboxProgressWaitForCompletion(progress.cprogress,
      C.int(timeout))
  if C.GoVboxFAILED(result) != 0 {
    return errors.New(fmt.Sprintf("Failed to wait on IProgress: %x", result))
  }
  return nil
}
func (progress* Progress) GetPercent() (int, error) {
  var cpercent C.PRUint32
  result := C.GoVboxGetProgressPercent(progress.cprogress, &cpercent)
  if C.GoVboxFAILED(result) != 0 {
    return 0, errors.New(
        fmt.Sprintf("Failed to get IProgress percent: %x", result))
  }
  return int(cpercent), nil
}
func (progress* Progress) GetResultCode() (int, error) {
  var code C.PRInt32
  result := C.GoVboxGetProgressResultCode(progress.cprogress, &code)
  if C.GoVboxFAILED(result) != 0 {
    return 0, errors.New(
        fmt.Sprintf("Failed to get IProgress result code: %x", result))
  }
  return int(code), nil
}