Important: The information in this document is obsolete and should not be used for new development.
AECreateDesc
You can use theAECreateDescfunction 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
AECreateDescfunction creates.DESCRIPTION
TheAECreateDescfunction creates a new descriptor record that incorporates the specified data. Your application is responsible for using theAEDisposeDescfunction to dispose of the resulting descriptor record when you no longer need it. You normally do this after receiving a result code from theAESendfunction.If
AECreateDescreturns a nonzero result code, it returns a null descriptor record unless the Apple Event Manager is not available because of limited memory.RESULT CODES
noErr 0 No error memFullErr -108 Not enough room in heap zone SEE ALSO
For examples of the use ofAECreateDesc, see "Adding Parameters to an Apple Event," which begins on page 5-5, and Listing 5-2 on page 5-11.