func (obj *Surface) GetDevice() (device *Device, err Error) {
	ret, _, _ := syscall.Syscall(
		obj.vtbl.GetDevice,
		2,
		uintptr(unsafe.Pointer(obj)),
		uintptr(unsafe.Pointer(&device)),
		0,
	)
	err = toErr(ret)
	return
}
GetDevice retrieves the device associated with a resource.
Call Release on the returned device when finished using it.
package d3d9
import (
	"syscall"
	"unsafe"
)
type Surface struct {
	vtbl *surfaceVtbl
}
type surfaceVtbl struct {
	QueryInterface uintptr
	AddRef         uintptr
	Release        uintptr
	GetDevice       uintptr
	SetPrivateData  uintptr
	GetPrivateData  uintptr
	FreePrivateData uintptr
	SetPriority     uintptr
	GetPriority     uintptr
	PreLoad         uintptr
	GetType         uintptr
	GetContainer    uintptr
	GetDesc         uintptr
	LockRect        uintptr
	UnlockRect      uintptr
	GetDC           uintptr
	ReleaseDC       uintptr
}
func (obj *Surface) AddRef() uint32 {
	ret, _, _ := syscall.Syscall(
		obj.vtbl.AddRef,
		1,
		uintptr(unsafe.Pointer(obj)),
		0,
		0,
	)
	return uint32(ret)
}
func (obj *Surface) Release() uint32 {
	ret, _, _ := syscall.Syscall(
		obj.vtbl.Release,
		1,
		uintptr(unsafe.Pointer(obj)),
		0,
		0,
	)
	return uint32(ret)
}