AEPutParamPtr
AEPutParamPtr Use pointer to create Apple Event parameter
#include <AppleEvents.h> Apple Event Manager
OSErr AEPutParamPtr( theAppleEvent, theAEKeyword, typeCode,
dataPtr, dataSize );
AppleEvent * theAppleEvent ; Apple Event to add parameter to
AEKeyword theAEkeyword ; Apple Event keyword
DescType typeCode ; descriptor type of created record
Ptr dataPtr ; pointer to record created
Size dataSize ; size of record created
returns Error Code; 0 = no error
The AEPutParamPtr function takes a pointer to data, a descriptor type, and
a keyword and converts them into a parameter that it adds to an Apple event.
The parameter theAppleEvent is the Apple event to which you are adding a
parameter.
The parameter theAEKeyword is the keyword for the parameter. If there was
already a parameter with this keyword in the Apple event, it is replaced.
The typeCode parameter is the descriptor type for the parameter.
The dataPtr parameter is a pointer to the data for the parameter.
The dataSize parameter is the length, in bytes, of the data for the parameter.
For an example program showing use of this routine, see the description of
Replying to an Apple Event.
Result codes
noErr (0) No error
memFullErr (-108) Not enough room in heap zone
errAEWrongDataType (-1703) Wrong descriptor type
errAENotAEDesc (-1704) Not a valid descriptor record
errAEBadListItem (-1705) Operation involving a list item failed