github.com/hspan/go-ole@v0.0.0/iconnectionpoint_windows.go (about) 1 // +build windows 2 3 package ole 4 5 import ( 6 "syscall" 7 "unsafe" 8 ) 9 10 func (v *IConnectionPoint) GetConnectionInterface(piid **GUID) int32 { 11 // XXX: This doesn't look like it does what it's supposed to 12 return release((*IUnknown)(unsafe.Pointer(v))) 13 } 14 15 func (v *IConnectionPoint) Advise(unknown *IUnknown) (cookie uint32, err error) { 16 hr, _, _ := syscall.Syscall( 17 v.VTable().Advise, 18 3, 19 uintptr(unsafe.Pointer(v)), 20 uintptr(unsafe.Pointer(unknown)), 21 uintptr(unsafe.Pointer(&cookie))) 22 if hr != 0 { 23 err = NewError(hr) 24 } 25 return 26 } 27 28 func (v *IConnectionPoint) Unadvise(cookie uint32) (err error) { 29 hr, _, _ := syscall.Syscall( 30 v.VTable().Unadvise, 31 2, 32 uintptr(unsafe.Pointer(v)), 33 uintptr(cookie), 34 0) 35 if hr != 0 { 36 err = NewError(hr) 37 } 38 return 39 } 40 41 func (v *IConnectionPoint) EnumConnections(p *unsafe.Pointer) error { 42 return NewError(E_NOTIMPL) 43 }