Esempio n. 1
0
func Unadvise(obj interface{}, method uintptr, cookie uint32) error {
	return com.HResultToError(syscall.Syscall(
		method,
		uintptr(2),
		uintptr(unsafe.Pointer(obj)),
		uintptr(cookie),
		uintptr(0)))
}
Esempio n. 2
0
func FindConnectionPoint(obj interface{}, method uintptr, interfaceID *com.GUID) (element *iconnectionpoint.ConnectionPoint, err error) {
	err = com.HResultToError(syscall.Syscall(
		method,
		uintptr(3),
		uintptr(unsafe.Pointer(obj)),
		uintptr(unsafe.Pointer(interfaceID)),
		uintptr(unsafe.Pointer(&element))))
	return
}
Esempio n. 3
0
// EnumConnectionPoints creates an enumerator object to iterate through
// connection points.
//
// XXX: Need to implement IEnumConnectionPoints structure.
func EnumConnectionPoints(obj interface{}, method uintptr) (element interface{}, err error) {
	err = com.HResultToError(syscall.Syscall(
		method,
		uintptr(2),
		uintptr(unsafe.Pointer(obj)),
		reflect.ValueOf(element).UnsafeAddr(),
		uintptr(0)))
	return
}
Esempio n. 4
0
// EnumConnections creates an enumerator object to iterate through current
// connections.
//
// XXX: Need IEnumConnections structure
func EnumConnections(obj interface{}, method uintptr) (element *interface{}, err error) {
	err = com.HResultToError(syscall.Syscall(
		method,
		uintptr(2),
		uintptr(unsafe.Pointer(obj)),
		uintptr(unsafe.Pointer(&element)),
		uintptr(0)))
	return 0
}
Esempio n. 5
0
func GetConnectionPointContainer(obj interface{}, method uintptr) (element *iconnectionpointcontainer.ConnectionPointContainer, err error) {
	err = com.HResultToError(syscall.Syscall(
		method,
		uintptr(2),
		uintptr(unsafe.Pointer(obj)),
		uintptr(unsafe.Pointer(&element)),
		uintptr(0)))
	return 0
}
Esempio n. 6
0
func GetConnectionInterface(obj interface{}, method uintptr) (interfaceID *com.GUID, err error) {
	err = com.HResultToError(syscall.Syscall(
		method,
		uintptr(2),
		uintptr(unsafe.Pointer(obj)),
		uintptr(unsafe.Pointer(&interfaceID)),
		uintptr(0)))
	return
}
Esempio n. 7
0
func Advise(obj interface{}, method uintptr, unknown *iunknown.IUnknown) (cookie uint32, err error) {
	err = com.HResultToError(syscall.Syscall(
		method,
		uintptr(3),
		uintptr(unsafe.Pointer(obj)),
		uintptr(unsafe.Pointer(unknown)),
		uintptr(unsafe.Pointer(&cookie))))
	return
}
Esempio n. 8
0
func GetClassInfo(obj interface{}, method uintptr) (element *itypeinfo.TypeInfo, err error) {
	err = com.HResultToError(syscall.Syscall(
		method,
		2,
		uintptr(unsafe.Pointer(obj)),
		uintptr(unsafe.Pointer(&element)),
		0))
	return
}
Esempio n. 9
0
func GetTypeInfoCount(obj interface{}, method uintptr) (c uint32, err error) {
	err = com.HResultToError(syscall.Syscall(
		method,
		uintptr(2),
		uintptr(unsafe.Pointer(obj)),
		uintptr(unsafe.Pointer(&c)),
		uintptr(0)))
	return
}
Esempio n. 10
0
func (v *Info) GetTypeAttr() (tattr *TYPEATTR, err error) {
	hr, _, _ := syscall.Syscall(
		uintptr(v.VTable().GetTypeAttr),
		2,
		uintptr(unsafe.Pointer(v)),
		uintptr(unsafe.Pointer(&tattr)),
		0)
	if hr != 0 {
		err = NewError(hr)
	}
	return
}