func (obj *Texture) GetPrivateData(refguid GUID) (data []byte, err Error) {
	var sizeInBytes uint
	ret, _, _ := syscall.Syscall6(
		obj.vtbl.GetPrivateData,
		4,
		uintptr(unsafe.Pointer(obj)),
		uintptr(unsafe.Pointer(&refguid)),
		0,
		uintptr(unsafe.Pointer(&sizeInBytes)),
		0,
		0,
	)
	if err := toErr(ret); err != nil {
		return nil, err
	}
	data = make([]byte, sizeInBytes)
	ret, _, _ = syscall.Syscall6(
		obj.vtbl.GetPrivateData,
		4,
		uintptr(unsafe.Pointer(obj)),
		uintptr(unsafe.Pointer(&refguid)),
		uintptr(unsafe.Pointer(&data[0])),
		uintptr(unsafe.Pointer(&sizeInBytes)),
		0,
		0,
	)
	return data, toErr(ret)
}
GetPrivateData copies the private data associated with the resource to a
provided buffer.
package d3d9
import (
	"syscall"
	"unsafe"
)
type Texture struct {
	vtbl *textureVtbl
}
type textureVtbl struct {
	QueryInterface uintptr
	AddRef         uintptr
	Release        uintptr
	GetDevice            uintptr
	SetPrivateData       uintptr
	GetPrivateData       uintptr
	FreePrivateData      uintptr
	SetPriority          uintptr
	GetPriority          uintptr
	PreLoad              uintptr
	GetType              uintptr
	SetLOD               uintptr
	GetLOD               uintptr
	GetLevelCount        uintptr
	SetAutoGenFilterType uintptr
	GetAutoGenFilterType uintptr
	GenerateMipSubLevels uintptr
	GetLevelDesc         uintptr
	GetSurfaceLevel      uintptr
	LockRect             uintptr
	UnlockRect           uintptr
	AddDirtyRect         uintptr
}
func (obj *Texture) baseTexturePointer() uintptr {
	return uintptr(unsafe.Pointer(obj))
}
func (obj *Texture) AddRef() uint32 {
	ret, _, _ := syscall.Syscall(
		obj.vtbl.AddRef,
		1,
		uintptr(unsafe.Pointer(obj)),
		0,
		0,
	)
	return uint32(ret)
}
func (obj *Texture) Release() uint32 {
	ret, _, _ := syscall.Syscall(
		obj.vtbl.Release,
		1,
		uintptr(unsafe.Pointer(obj)),
		0,
		0,
	)
	return uint32(ret)
}
func (obj *Texture) 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
}
func (obj *Texture) SetPrivateData(
	refguid GUID,
	data uintptr,
	sizeOfData uint32,
	flags uint32,
) Error {
	ret, _, _ := syscall.Syscall6(
		obj.vtbl.SetPrivateData,
		5,
		uintptr(unsafe.Pointer(obj)),
		uintptr(unsafe.Pointer(&refguid)),
		data,
		uintptr(sizeOfData),
		uintptr(flags),
		0,
	)
	return toErr(ret)
}
func (obj *Texture) SetPrivateDataBytes(
	refguid GUID,
	data []byte,
	flags uint32,
) Error {
	return obj.SetPrivateData(
		refguid,
		uintptr(unsafe.Pointer(&data[0])),
		uint32(len(data)),
		flags,
	)
}