func copyVariant(p *syscall.Proc, source *types.Variant) (destination *types.Variant, err error) { err = errors.HResultToError(p.Call( uintptr(unsafe.Pointer(&destination)), uintptr(unsafe.Pointer(source)))) return }
func PutElement(array *types.COMArray, index int64, element interface{}) (err error) { err = errors.HResultToError(procSafeArrayPutElement.Call( uintptr(unsafe.Pointer(array)), uintptr(index), uintptr(unsafe.Pointer(&element)))) return }
func GetPointerOfIndex(array *types.COMArray, index int64) (ref uintptr, err error) { err = errors.HResultToError(procSafeArrayPtrOfIndex.Call( uintptr(unsafe.Pointer(array)), uintptr(index), uintptr(unsafe.Pointer(&ref)))) return }
// AllocateArrayDescriptorEx allocates SafeArray. // // AKA: SafeArrayAllocDescriptorEx in Windows API. func AllocateArrayDescriptorEx(variantType types.VariantType, dimensions uint32) (array *types.COMArray, err error) { err = errors.HResultToError(procSafeArrayAllocDescriptorEx.Call( uintptr(variantType), uintptr(dimensions), uintptr(unsafe.Pointer(&array)))) return }
func GetUpperBound(array *types.COMArray, dimension uint32) (upperBound int64, err error) { err = errors.HResultToError(procSafeArrayGetUBound.Call( uintptr(unsafe.Pointer(array)), uintptr(dimension), uintptr(unsafe.Pointer(&upperBound)))) return }
func GetVariantType(array *types.COMArray) (varType types.VariantType, err error) { var vt uint16 err = errors.HResultToError(procSafeArrayGetVartype.Call( uintptr(unsafe.Pointer(array)), uintptr(unsafe.Pointer(&vt)))) varType = com.VariantType(vt) return }
func VariantChangeType(source *types.Variant, flags uint16, vt types.VariantType) (destination *types.Variant, err error) { err = errors.HResultToError(procVariantChangeType.Call( uintptr(unsafe.Pointer(&destination)), uintptr(unsafe.Pointer(source)), uintptr(flags), uintptr(vt))) return }
func VariantClear(v *types.Variant) error { return errors.HResultToError(procVariantClear.Call(uintptr(unsafe.Pointer(v)))) }
// Duplicate returns copy of SafeArray. // // AKA: SafeArrayCopy in Windows API. func Duplicate(original *types.COMArray) (array *types.COMArray, err error) { err = errors.HResultToError(procSafeArrayCopy.Call( uintptr(unsafe.Pointer(original)), uintptr(unsafe.Pointer(&array)))) return }
// AllocateArrayData allocates SafeArray. // // AKA: SafeArrayAllocData in Windows API. func AllocateArrayData(array *types.COMArray) (err error) { err = errors.HResultToError(procSafeArrayAllocData.Call(uintptr(unsafe.Pointer(array)))) return }
// UnaccessData releases raw array. // // AKA: SafeArrayUnaccessData in Windows API. func UnaccessData(array *types.COMArray) (err error) { err = errors.HResultToError(procSafeArrayUnaccessData.Call(uintptr(unsafe.Pointer(array)))) return }
// AccessData returns raw array. // // AKA: SafeArrayAccessData in Windows API. func AccessData(array *types.COMArray) (element uintptr, err error) { err = errors.HResultToError(procSafeArrayAccessData.Call( uintptr(unsafe.Pointer(array)), uintptr(unsafe.Pointer(&element)))) return }
func DestroyDescriptor(array *types.COMArray) error { return errors.HResultToError(procSafeArrayDestroyDescriptor.Call(uintptr(unsafe.Pointer(array)))) }
func ResetDimensions(array *types.COMArray, bounds *types.Bounds) error { err = errors.HResultToError(procSafeArrayRedim.Call( uintptr(unsafe.Pointer(array)), uintptr(unsafe.Pointer(bounds)))) return }
func SetInterfaceID(array *types.COMArray, interfaceID *types.GUID) (err error) { err = errors.HResultToError(procSafeArraySetIID.Call( uintptr(unsafe.Pointer(array)), uintptr(unsafe.Pointer(interfaceID)))) return }
func Lock(array *types.COMArray) (err error) { err = errors.HResultToError(procSafeArrayLock.Call(uintptr(unsafe.Pointer(array)))) return }
func SetRecordInfo(array *types.COMArray, recordInfo interface{}) (err error) { err = errors.HResultToError(procSafeArraySetRecordInfo.Call( uintptr(unsafe.Pointer(array)), uintptr(unsafe.Pointer(recordInfo)))) return }
// DuplicateData duplicates SafeArray into another SafeArray object. // // AKA: SafeArrayCopyData in Windows API. func DuplicateData(original, duplicate *types.COMArray) (err error) { err = errors.HResultToError(procSafeArrayCopyData.Call( uintptr(unsafe.Pointer(original)), uintptr(unsafe.Pointer(&duplicate)))) return }
func GetInterfaceID(array *types.COMArray) (guid *types.GUID, err error) { err = errors.HResultToError(procSafeArrayGetIID.Call( uintptr(unsafe.Pointer(array)), uintptr(unsafe.Pointer(&guid)))) return }