Contents

AEStreamWriteKeyDesc(_:_:_:_:_:)

Writes a complete keyword/descriptor pair to an AEStreamRef.

Declaration

func AEStreamWriteKeyDesc(_ ref: AEStreamRef!, _ key: AEKeyword, _ newType: DescType, _ data: UnsafeRawPointer!, _ length: Size) -> OSStatus

Parameters

  • ref:

    An Aestreamref containing the stream data.

  • key:

    The AEKeyword associated with the new descriptor being added to the stream. See Aekeyword.

  • newType:

    A type code for the new AEDesc being added to the stream. See Desctype.

  • data:

    A pointer to the block of memory containing the descriptor data. This routine copies the memory block immediately, so you do not need to retain it for the benefit of this routine.

  • length:

    The number of bytes pointed to by the data parameter.

Return Value

A result code. See Result Codes.

Discussion

Use this routine to add a descriptor to the currently open AERecord inside a stream. You cannot use this routine to write parameters to any other types of descriptors, even if they are nested inside of an AERecord. This routine can only be called in between calls to AEStreamOpenRecord(_:_:) and AEStreamCloseRecord(_:).

This method is analogous to the Apple Event Manager routine AEPutParamPtr(_:_:_:_:_:), except it is for use with streams.

See Also

Creating Apple Event Structures Using Streams