Important: The information in this document is obsolete and should not be used for new development.
AEGetEventHandler
You can use theAEGetEventHandler
function to get an entry from an Apple event dispatch table.
FUNCTION AEGetEventHandler (theAEEventClass: AEEventClass; theAEEventID: AEEventID; VAR handler: EventHandlerProcPtr; VAR handlerRefcon: LongInt; isSysHandler: Boolean): OSErr;
theAEEventClass
- The value of the event class field of the dispatch table entry for the desired handler.
theAEEventID
- The value of the event ID field of the dispatch table entry for the desired handler.
handler
- The
AEGetEventHandler
function returns, in this parameter, a pointer to the specified handler.handlerRefcon
- The
AEGetEventHandler
function returns, in this parameter, the reference constant from the dispatch table entry for the specified handler.isSysHandler
Specifies the Apple event dispatch table from which to get the handler. If the value ofisSysHandler
isTRUE
, theAEGetEventHandler
function returns the handler from the system dispatch table. If the value isFALSE
,AEGetEventHandler
returns the handler from your application's dispatch table.DESCRIPTION
TheAEGetEventHandler
function returns, in thehandler
parameter, a pointer to the handler for the Apple event dispatch table entry you specify in the parameterstheAEEventClass
andtheAEEventID
. You can use thetypeWildCard
constant for either or both of these parameters; however,AEGetEventHandler
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 return 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.