Decodes and dispatches a low level Mach message event to an event handler, including packaging and returning the reply to the sender.
- macOS 10.0+
- Core Services
A pointer to the received Mach message that should be processed. The contents of the message header are invalid after calling this method.
A result code. See Result Codes.
The Apple Event Manager provides the following functions (in macOS only) for working with Apple events at a lower level:
AEProcess. See the descriptions for those functions for more information on when you might use them.
If your daemon or other code has initialized a Mach port and is listening on it for Apple events and other messages, it can call
AEProcess to handle any incoming events it identifies as Apple events, while handling other types of events itself.
AEProcess will dispatch the event to an event handler (by calling
AEDecode for you) and package and return the reply to the sender, simplifying handling for your code.
The Apple Event Manager reserves Mach message IDs in the range 0 to 999 for its own use.
AEProcess returns a
param result code if the Mach message did not contain an Apple event.