github.com/hspan/go-ole@v0.0.0/itypeinfo_windows.go (about)

     1  // +build windows
     2  
     3  package ole
     4  
     5  import (
     6  	"syscall"
     7  	"unsafe"
     8  )
     9  
    10  func (v *ITypeInfo) GetTypeAttr() (tattr *TYPEATTR, err error) {
    11  	hr, _, _ := syscall.Syscall(
    12  		uintptr(v.VTable().GetTypeAttr),
    13  		2,
    14  		uintptr(unsafe.Pointer(v)),
    15  		uintptr(unsafe.Pointer(&tattr)),
    16  		0)
    17  	if hr != 0 {
    18  		err = NewError(hr)
    19  	}
    20  	return
    21  }