Пример #1
0
func CreateArray(variantType types.VariantType, dimensions uint32, bounds *types.Bounds) (array *types.COMArray, err error) {
	sa, _, err := C.SafeArrayCreate(uint16(variantType), dimensions, bounds)
	array = (*types.COMArray)(unsafe.Pointer(&sa))
	return
}
Пример #2
0
// CreateArray creates SafeArray.
//
// AKA: SafeArrayCreate in Windows API.
func CreateArray(variantType com.VariantType, dimensions uint32, bounds *Bounds) (safearray *COMArray, err error) {
	sa, _, err := C.SafeArrayCreate(uint16(variantType), dimensions, bounds)
	safearray = (*COMArray)(unsafe.Pointer(&sa))
	return
}