AECreateDesc
AECreateDesc Create Apple Event descriptor record
#include <AppleEvents.h> Apple Event Manager
OSErr AECreateDesc ( typeCode, dataPtr, dataSize, result );
DescType typeCode ; descriptor type of the descriptor record
Ptr dataPtr ; pointer to data for the descriptor record
Size dataSize ; size of the descriptor record
AEDesc * result ; created descriptor record
returns Error Code; 0 = no error
The AECreateDesc function takes data and converts it into a
descriptor record.
The typeCode parameter is the descriptor type for the resulting descriptor
record.
The dataPtr parameter is a pointer to the data for the descriptor record.
The dataSize parameter is the length, in bytes, of the data for the descriptor
record.
The AECreateDesc function returns in the result parameter the resulting
descriptor record. This function creates a new descriptor record by copying
the descriptor record from the parameter. Your application is responsible for
using the AEDisposeDesc function to dispose of the resulting descriptor
record once you are finished using it. You normally do this after receiving a
result from the AESend function.
If the function returns a nonzero result code, a descriptor record with the
typeNull descriptor type is returned. A descriptor record of this type does not
contain any data.
For an example program showing usage of this routine, see the description of
Adding Parameters to an Apple Event or
Specifying a Target Address.
Result codes
noErr (0) No error
memFullErr (-108) Not enough room in heap zone