Important: The information in this document is obsolete and should not be used for new development.
AERemoveEventHandler
You can use theAERemoveEventHandlerfunction to remove an entry from an Apple event dispatch table.
FUNCTION AERemoveEventHandler (theAEEventClass: AEEventClass; theAEEventID: AEEventID; handler: EventHandlerProcPtr; isSysHandler: Boolean): OSErr;
theAEEventClass- The event class for the handler whose entry you want to remove from the dispatch table.
theAEEventID- The event ID for the handler whose entry you want to remove from the Apple event dispatch table.
handler- A pointer to the handler to be removed. Although the parameters
theAEEventClassandtheAEEventIDwould be sufficient to identify the handler to be removed, providing the handler parameter is a recommended safeguard that ensures that you remove the correct handler. If the value of this parameter isNIL, the Apple Event Manager relies solely on the event class and event ID to identify the handler to be removed.isSysHandler
Specifies the dispatch table from which to remove the handler. If the value ofisSysHandlerisTRUE,AERemoveEventHandlerremoves the handler from the system dispatch table. If the value isFALSE,AERemoveEventHandlerremoves the handler from your application's dispatch table.DESCRIPTION
TheAERemoveEventHandlerfunction removes the Apple event dispatch table entry you specify in the parameterstheAEEventClass,theAEEventID, andhandler. You can use thetypeWildCardconstant for thetheAEEventClassor thetheAEEventIDparameter, or for both parameters; however,AERemoveEventHandlerreturns an error unless an entry exists that specifiestypeWildCardin exactly the same way. For example, if you specifytypeWildCardin both thetheAEEventClassparameter and thetheAEEventIDparameter, the Apple Event Manager will not remove the first handler for any event class and event ID in the dispatch table; instead, the dispatch table must contain an entry that specifies typetypeWildCardfor both the event class and the event ID.RESULT CODES
noErr 0 No error errAEHandlerNotFound -1717 No handler found for an Apple event SEE ALSO
For an explanation of wildcard values, see the description of theAEInstallEventHandlerfunction on page 4-62.