Example #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)))
}
Example #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
}
Example #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
}
Example #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
}
Example #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
}
Example #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
}
Example #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
}
Example #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
}
Example #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
}
Example #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
}