예제 #1
0
파일: client.go 프로젝트: jmptrader/types
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)))
}
예제 #2
0
파일: client.go 프로젝트: jmptrader/types
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
}
예제 #3
0
파일: client.go 프로젝트: jmptrader/types
// 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
}
예제 #4
0
파일: client.go 프로젝트: jmptrader/types
// 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
}
예제 #5
0
파일: client.go 프로젝트: jmptrader/types
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
}
예제 #6
0
파일: client.go 프로젝트: jmptrader/types
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
}
예제 #7
0
파일: client.go 프로젝트: jmptrader/types
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
}
예제 #8
0
파일: client.go 프로젝트: jmptrader/types
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
}
예제 #9
0
파일: client.go 프로젝트: jmptrader/types
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
}
예제 #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
}