Carbon


AERemoveEventHandler

Header: AppleEvents.h Carbon status: Supported

Removes an event handler entry from an Apple event dispatch table.

OSErr AERemoveEventHandler (
    AEEventClass theAEEventClass, 
    AEEventID theAEEventID, 
    AEEventHandlerUPP handler, 
    Boolean isSysHandler
);
Parameter descriptions
theAEEventClass

The event class for the handler to remove.

theAEEventID

The event ID for the handler to remove.

handler

A universal procedure pointer to the handler to remove. Although the parameters theAEEventClass and theAEEventID are sufficient to identify the handler, you can identify the handler explicitly as a safeguard. If you pass NULL for this parameter, the Apple Event Manager relies solely on the event class and event ID to identify the handler.

If you use the typeWildCard constant for either or both of the event class and event ID parameters, AERemoveEventHandler will return an error unless an entry exists that specifies typeWildCard in exactly the same way. For example, if you specify typeWildCard in both the theAEEventClass parameter and the theAEEventID parameter, AERemoveEventHandler will 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 typeWildCard for both the event class and the event ID.

For an explanation of wildcard values, see the Discussion section for AEInstallEventHandler.

isSysHandler

Specifies the Apple event dispatch table to remove the handler from. Pass TRUE to remove the handler from the system dispatch table or FALSE to remove the handler from your application’s dispatch table. See Platform Considerations for related information.

function result

A result code.

VERSION NOTES

A Carbon 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 necessarily work. See “Apple Event Dispatching” (to be supplied later) for more information.

AVAILABILITY

Supported in Carbon. Available in Carbon 1.0.2 and later when running Mac OS 8.1 or later.


© 2000 Apple Computer, Inc. (Last Updated 6/30/2000)