Function

AEStreamWriteDesc

Appends the data for a complete descriptor to an AEStreamRef.

Declaration

OSStatus AEStreamWriteDesc(AEStreamRef ref, DescType newType, const void *data, Size length);

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

AEStreamClose

Closes and deallocates an AEStreamRef.

AEStreamCloseDesc

Marks the end of a descriptor in an AEStreamRef.

AEStreamCloseList

Marks the end of a list of descriptors in an AEStreamRef.

AEStreamCloseRecord

Marks the end of a record in an AEStreamRef.

AEStreamCreateEvent

Creates a new Apple event and opens a stream for writing data to it.

AEStreamOpen

Opens a new AEStreamRef for use in building a descriptor.

AEStreamOpenDesc

Marks the beginning of a descriptor in an AEStreamRef.

AEStreamOpenEvent

Opens a stream for an existing Apple event.

AEStreamOpenKeyDesc

Marks the beginning of a key descriptor in an AEStreamRef.

AEStreamOpenList

Marks the beginning of a descriptor list in an AEStreamRef.

AEStreamOpenRecord

Marks the beginning of an Apple event record in an AEStreamRef.

AEStreamOptionalParam

Designates a parameter in an Apple event as optional.

AEStreamSetRecordType

Sets the type of the most recently created record in an AEStreamRef.

AEStreamWriteAEDesc

Copies an existing descriptor into an AEStreamRef.

AEStreamWriteData

Appends data to the current descriptor in an AEStreamRef.

AEStreamWriteKey

Marks the beginning of a keyword/descriptor pair for a descriptor in an AEStreamRef.

AEStreamWriteKeyDesc

Writes a complete keyword/descriptor pair to an AEStreamRef.