Removes an event handler entry from an Apple event dispatch table.
- macOS 10.0+
- Core Services
The event class for the handler to remove. See
The event ID for the handler to remove. See
A universal procedure pointer to the handler to remove. Although the parameters
theare sufficient to identify the handler, you can identify the handler explicitly as a safeguard. If you pass
NULLfor this parameter, the Apple Event Manager relies solely on the event class and event ID to identify the handler.
If you use the
typeconstant for either or both of the event class and event ID parameters,
AERemovewill return an error unless an entry exists that specifies
typein exactly the same way. For example, if you specify
typein both the
theparameter and the
AERemovewill not remove the first handler for any event class and event ID in the dispatch table; instead, it will only remove a handler if an entry exists that specifies type
typefor both the event class and the event ID.
For an explanation of wildcard values, see the Discussion section for
Specifies the Apple event dispatch table to remove the handler from. Pass
TRUEto remove the handler from the system dispatch table or
FALSEto remove the handler from your application’s dispatch table. See Version Notes for related information.
A result code. See Result Codes.
Thread safe starting in OS X v10.2.
Your application should not install a handler in a system dispatch table with the goal that the handler will get called when other applications receive events—this won’t work in macOS. For more information, see The System Dispatch Table in Apple Event Dispatching in Apple Events Programming Guide.