Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: Interapplication Communication /
Chapter 5 - Creating and Sending Apple Events / Reference to Creating and Sending Apple Events
Routines for Creating and Sending Apple Events / Creating and Duplicating Descriptor Records


AECreateDesc

You can use the AECreateDesc function to convert data into a descriptor record.

FUNCTION AECreateDesc (typeCode: DescType; dataPtr: Ptr; 
                       dataSize: Size; VAR result: AEDesc): OSErr;
typeCode
The descriptor type for the descriptor record.
dataPtr
A pointer to the data for the descriptor record.
dataSize
The length, in bytes, of the data for the descriptor record.
result
The descriptor record that the AECreateDesc function creates.
DESCRIPTION
The AECreateDesc function creates a new descriptor record that incorporates the specified data. Your application is responsible for using the AEDisposeDesc function to dispose of the resulting descriptor record when you no longer need it. You normally do this after receiving a result code from the AESend function.

If AECreateDesc returns a nonzero result code, it returns a null descriptor record unless the Apple Event Manager is not available because of limited memory.

RESULT CODES
noErr0No error
memFullErr-108Not enough room in heap zone
SEE ALSO
For examples of the use of AECreateDesc, see "Adding Parameters to an Apple Event," which begins on page 5-5, and Listing 5-2 on page 5-11.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996