Important: The information in this document is obsolete and should not be used for new development.
AERemoveEventHandler
You can use theAERemoveEventHandler
function 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
theAEEventClass
andtheAEEventID
would 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 ofisSysHandler
isTRUE
,AERemoveEventHandler
removes the handler from the system dispatch table. If the value isFALSE
,AERemoveEventHandler
removes the handler from your application's dispatch table.DESCRIPTION
TheAERemoveEventHandler
function removes the Apple event dispatch table entry you specify in the parameterstheAEEventClass
,theAEEventID
, andhandler
. You can use thetypeWildCard
constant for thetheAEEventClass
or thetheAEEventID
parameter, or for both parameters; however,AERemoveEventHandler
returns an error unless an entry exists that specifiestypeWildCard
in exactly the same way. For example, if you specifytypeWildCard
in both thetheAEEventClass
parameter and thetheAEEventID
parameter, 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 typetypeWildCard
for 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 theAEInstallEventHandler
function on page 4-62.