---
title: AEStreamOpen()
framework: coreservices
role: symbol
role_heading: Function
path: coreservices/1447732-aestreamopen
---

# AEStreamOpen()

Opens a new AEStreamRef for use in building a descriptor.

## Declaration

```swift
func AEStreamOpen() -> AEStreamRef!
```

## Return Value

Return Value A new AEStreamRef or NULL if the stream data structures cannot be allocated.

## Discussion

Discussion This function creates a new stream for use in describing the contents of a descriptor, descriptor list, or Apple event record (AEDesc, AEDescList, or AERecord).  You can use the returned AEStreamRef with other “AEStream” routines to build the contents of a descriptor. When you are done building the descriptor, use AEStreamClose(_:_:) to close the stream.

## See Also

### Creating Apple Event Structures Using Streams

- [AEStreamClose(_:_:)](coreservices/1449821-aestreamclose.md)
- [AEStreamCloseDesc(_:)](coreservices/1449272-aestreamclosedesc.md)
- [AEStreamCloseList(_:)](coreservices/1448185-aestreamcloselist.md)
- [AEStreamCloseRecord(_:)](coreservices/1449522-aestreamcloserecord.md)
- [AEStreamCreateEvent(_:_:_:_:_:_:_:)](coreservices/1446562-aestreamcreateevent.md)
- [AEStreamOpenDesc(_:_:)](coreservices/1446544-aestreamopendesc.md)
- [AEStreamOpenEvent(_:)](coreservices/1445366-aestreamopenevent.md)
- [AEStreamOpenKeyDesc(_:_:_:)](coreservices/1442897-aestreamopenkeydesc.md)
- [AEStreamOpenList(_:)](coreservices/1448594-aestreamopenlist.md)
- [AEStreamOpenRecord(_:_:)](coreservices/1447141-aestreamopenrecord.md)
- [AEStreamOptionalParam(_:_:)](coreservices/1444481-aestreamoptionalparam.md)
- [AEStreamSetRecordType(_:_:)](coreservices/1447704-aestreamsetrecordtype.md)
- [AEStreamWriteAEDesc(_:_:)](coreservices/1448487-aestreamwriteaedesc.md)
- [AEStreamWriteData(_:_:_:)](coreservices/1442610-aestreamwritedata.md)
- [AEStreamWriteDesc(_:_:_:_:)](coreservices/1450387-aestreamwritedesc.md)
- [AEStreamWriteKey(_:_:)](coreservices/1448750-aestreamwritekey.md)
- [AEStreamWriteKeyDesc(_:_:_:_:_:)](coreservices/1442568-aestreamwritekeydesc.md)
