Contents

AEStreamWriteDesc(_:_:_:_:)

Appends the data for a complete descriptor to an AEStreamRef.

Declaration

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

Parameters

  • ref:

    An Aestreamref containing the stream data.

  • 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 write the data for a descriptor to the stream. When using this routine, you must supply all of the descriptor data at once.

Do not use AEStreamOpenDesc(_:_:) and AEStreamCloseDesc(_:) with this routine to open and close the descriptor.

See Also

Creating Apple Event Structures Using Streams