Function

AESizeOfParam(_:_:_:_:)

Gets the size and descriptor type of an Apple event parameter from a descriptor of type AERecord or AppleEvent.

Declaration

func AESizeOfParam(_ theAppleEvent: UnsafePointer<AppleEvent>!, _ theAEKeyword: AEKeyword, _ typeCode: UnsafeMutablePointer<DescType>!, _ dataSize: UnsafeMutablePointer<Size>!) -> OSErr

Parameters

theAppleEvent

A pointer to the Apple event to get the parameter data from. See AppleEvent.

theAEKeyword

The keyword that specifies the desired parameter. Some keyword parameter constants are described in Keyword Parameter Constants. See AEKeyword.

typeCode

A pointer to a descriptor type. On return, specifies the descriptor type of the Apple event parameter. For a list of AppleScript’s predefined descriptor types, see Descriptor Type Constants. See DescType.

dataSize

A pointer to a size variable. On return, the length, in bytes, of the data in the Apple event parameter.

Return Value

A result code. See Result Codes.

Discussion

Thread safe starting in OS X v10.2.

See Also

Getting the Sizes and Descriptor Types of Descriptors

func AESizeOfAttribute(UnsafePointer<AppleEvent>!, AEKeyword, UnsafeMutablePointer<DescType>!, UnsafeMutablePointer<Size>!) -> OSErr

Gets the size and descriptor type of an Apple event attribute from a descriptor of type AppleEvent.

func AESizeOfNthItem(UnsafePointer<AEDescList>!, Int, UnsafeMutablePointer<DescType>!, UnsafeMutablePointer<Size>!) -> OSErr

Gets the data size and descriptor type of the descriptor at a specified position in a descriptor list.