Gets the data from the specified descriptor.


func AEGetDescData(_ theAEDesc: UnsafePointer<AEDesc>!, _ dataPtr: UnsafeMutableRawPointer!, _ maximumSize: Size) -> OSErr



A pointer to the descriptor to get the data from. See AEDesc.


A pointer to a buffer, local variable, or other storage location created and disposed of by your application. The size in bytes should be the same as the value you pass in the maximumSize parameter. On return, contains the data from the descriptor.


The length, in bytes, of the expected descriptor data. The AEGetDescData function will not return more data than you specify in this parameter. You typically determine the maximum size by calling AEGetDescDataSize(_:).

Return Value

A result code. See Result Codes.


Your application can call AEGetDescDataSize(_:) to get the size, in bytes, of the data in a descriptor, allocate a buffer or variable of that size, then call AEGetDescData to get the data.

This function works only with value descriptors created by AECreateDesc(_:_:_:_:). You cannot get the data of an AERecord or AEDescList, for example.


Thread safe starting in OS X v10.2.

See Also

Operating On Descriptor Data

func AEGetDescDataSize(UnsafePointer<AEDesc>!) -> Size

Gets the size, in bytes, of the data in the specified descriptor.

func AEGetDescDataRange(UnsafePointer<AEDesc>!, UnsafeMutableRawPointer!, Size, Size) -> OSStatus

Retrieves a specified series of bytes from the specified descriptor.

func AEReplaceDescData(DescType, UnsafeRawPointer!, Size, UnsafeMutablePointer<AEDesc>!) -> OSErr

Copies the specified data into the specified descriptor, replacing any previous data.