Important: The information in this document is obsolete and should not be used for new development.
AECreateAppleEvent
You can use theAECreateAppleEvent
function to create an Apple event with several important attributes but no parameters. You add parameters to the Apple event after you create it.
FUNCTION AECreateAppleEvent (theAEEventClass: AEEventClass; theAEEventID: AEEventID; target: AEAddressDesc; returnID: Integer; transactionID: LongInt; VAR result: AppleEvent): OSErr;
theAEEventClass
The event class of the Apple event to be created.theAEEventID
The event ID of the Apple event to be created.target
- The address of the server application.
returnID
- The return ID for the Apple event; if you specify
kAutoGenerateReturnID
, the Apple Event Manager assigns a return ID that is unique to the current session.transactionID
- The transaction ID for this Apple event. A transaction is a sequence of Apple events that are sent back and forth between the client and server applications, beginning with the client's initial request for a service. All Apple events that are part of a transaction must have the same transaction ID.
result
- The
AECreateAppleEvent
function returns, in this parameter, the Apple event that it creates.DESCRIPTION
TheAECreateAppleEvent
function creates an Apple event.Your application is responsible for using theAEDisposeDesc
function to dispose of the Apple event when you no longer need it.If
AECreateAppleEvent
returns 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
See "Creating an Apple Event," which begins on page 5-3, for more information on how to create an Apple event.See "Specifying a Target Address" on page 5-10 for information on how to address an Apple event.