Important: The information in this document is obsolete and should not be used for new development.
AEDuplicateDesc
You can use theAEDuplicateDescfunction to make a copy of a descriptor record.
FUNCTION AEDuplicateDesc (theAEDesc: AEDesc; VAR result: AEDesc): OSErr;
theAEDesc- The descriptor record to be duplicated.
result- The duplicate descriptor record.
DESCRIPTION
TheAEDuplicateDescfunction creates a new descriptor record by copying the descriptor record from the parametertheAEDesc. Your application is responsible for using theAEDisposeDescfunction to dispose of the resulting descriptor record when you no longer need it. You normally do this after receiving a result code from theAESendfunction.If
AEDuplicateDescreturns a nonzero result code, it returns a null descriptor record unless the Apple Event Manager is not available because of limited memory.It is common for applications to send Apple events that have one or more attributes or parameters in common. For example, if you send a series of Apple events to the same application, the address attribute is the same. In these cases, the most efficient way to create the necessary Apple events is to make a template Apple event that you can then copy--by calling the
AEDuplicateDescfunction--as needed. You then fill in or change the remaining parameters and attributes of the copy, send the copy by callingAESend, and dispose of the copy--by callingAEDisposeDesc--afterAESendreturns a result code.RESULT CODES
noErr 0 No error memFullErr -108 Not enough room in heap zone