Function

AESizeOfAttribute

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

Declaration

OSErr AESizeOfAttribute(const AppleEvent *theAppleEvent, AEKeyword theAEKeyword, DescType *typeCode, Size *dataSize);

Parameters

theAppleEvent

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

theAEKeyword

The keyword that specifies the attribute. Some keyword constants are described in Keyword Attribute Constants. See AEKeyword.

typeCode

A pointer to a descriptor type. On return, specifies the descriptor type of the attribute. For a list of AppleScript’s predefined descriptor types, see Descriptor Type Constants. Can be NULL. See DescType.

dataSize

A pointer to a size variable. On return, the length, in bytes, of the data in the attribute. Can be NULL.

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

AESizeOfKeyDesc

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

AESizeOfNthItem

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

AESizeOfParam

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