Creates a copy of a descriptor.
- macOS 10.0+
- Core Services
A pointer to the descriptor to duplicate. See
A pointer to a descriptor. On return, the descriptor contains a copy of the descriptor specified by the
theparameter. If the function returns successfully, your application should call the
AEDisposefunction to dispose of the resulting descriptor after it has finished using it.
A result code. See Result Codes.
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
AEDuplicate function—as needed. You then fill in or change the remaining parameters and attributes of the copy, send the copy by calling the AESend function and, after
AESend returns a result code, dispose of the copy by calling
AEDispose. You can use this approach to prepare structures of type
Thread safe starting in OS X v10.2.