AECreateList
AECreateList Create an empty descriptor list or AE record
#include <AppleEvents.h> Apple Event Manager
OSErr AECreateList (factoringPtr, factoredSize, isRecord, resultList );
Ptr factoringPtr ; pointer to descriptor common data, or NIL
Size factoredSize ; size of the common data (if any)
Boolean isRecord ; TRUE= create AE record,
FALSE = create descriptor list
AEDescList * resultList ; points to created record or list
returns Error Code; 0 = no error
The AECreateList function creates an empty descriptor list or AE record.
You can compress descriptor lists-thereby saving both space and, in some
cases, transmission time-by isolating data at the beginning of each descriptor
record that is the same for all descriptor records in the list. This common data
is sent only once for all the descriptor records in the list. When an application
gets descriptor records from a compressed
descriptor list, the Apple Event Manager automatically decompresses
them.
The factoringPtr parameter is a pointer to the data at the beginning of each
descriptor that is the same for all descriptor records in the list. (The method
for compressing descriptor lists is analogous to extracting the common factor
from two or more numbers.) If there is no common data, or if you decide not to
isolate the common data, provide NIL as the value of the factoringPtr
parameter.
The factoredSize parameter is the size of the common data. If there is no
common data, or if you decide not to isolate the common data, the value of
factoredSize must be 0.
The isRecord parameter is a Boolean value that specifies the kind of list to
create. If you set its value to TRUE, the Apple Event Manager creates an
AE record. If you set its value to FALSE, the Apple Event Manager creates a
descriptor list.
The AECreateList function returns in the resultList parameter the
resulting descriptor list or AE 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.
Result codes
noErr (0) No error
paramErr (-50) Parameter error ( handler pointer is NIL or odd)
memFullErr (-108) Not enough room in heap zone