---
title: "AEGetDescData(_:_:_:)"
framework: coreservices
role: symbol
role_heading: Function
path: coreservices/1444427-aegetdescdata
---

# AEGetDescData(_:_:_:)

Gets the data from the specified descriptor.

## Declaration

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

## Parameters

- `theAEDesc`: A pointer to the descriptor to get the data from. See doc://com.apple.documentation/documentation/coreservices/aedesc.
- `dataPtr`: 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.
- `maximumSize`: 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 doc://com.apple.documentation/documentation/coreservices/1450119-aegetdescdatasize.

## Return Value

Return Value A result code. See Result Codes.

## Discussion

Discussion 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. Version-Notes Thread safe starting in OS X v10.2.

## See Also

### Operating On Descriptor Data

- [AEGetDescDataSize(_:)](coreservices/1450119-aegetdescdatasize.md)
- [AEGetDescDataRange(_:_:_:_:)](coreservices/1446560-aegetdescdatarange.md)
- [AEReplaceDescData(_:_:_:_:)](coreservices/1446695-aereplacedescdata.md)
