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 / Adding Items to Descriptor Lists


AEPutPtr

You can use the AEPutPtr routine to add data specified in a buffer to any descriptor list as a descriptor record.

FUNCTION AEPutPtr (theAEDescList: AEDescList; index: LongInt;
                   typeCode: DescType; dataPtr: Ptr; 
                   dataSize: Size): OSErr;
theAEDescList
The descriptor list to which to add a descriptor record.
index
The position of the descriptor record in the descriptor list. (For example, the value 2 specifies the second descriptor record in the list.) If there is already a descriptor record in the specified position, it is replaced. If the value of index is 0, the descriptor record is added to the end of the list.
typeCode
The descriptor type for the resulting 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 CODES
noErr0No error
memFullErr-108Not enough room in heap zone
errAEWrongDataType-1703Wrong descriptor type
errAENotAEDesc-1704Not a valid descriptor record
errAEBadListItem-1705Operation involving a list item failed
errAEIllegalIndex-1719Not a valid list index
SEE ALSO
For an example of the use of AEPutPtr, see Listing 5-1 on page 5-9.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996