Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: Interapplication Communication /
Chapter 4 - Responding to Apple Events / Reference to Responding to Apple Events
Routines for Responding to Apple Events / Creating and Managing the Coercion Handler Dispatch Tables


AEGetCoercionHandler

You can use the AEGetCoercionHandler function to get the handler for a specified descriptor type coercion.

FUNCTION AEGetCoercionHandler (fromType: DescType; 
                               toType: DescType; 
                               VAR handler: ProcPtr; 
                               VAR handlerRefcon: LongInt; 
                               VAR fromTypeIsDesc: Boolean; 
                               isSysHandler: Boolean): OSErr;
fromType
The descriptor type of the data coerced by the handler.
toType
The descriptor type of the resulting data.
handler
A pointer to the desired coercion handler.
handlerRefcon

The reference constant for the desired handler. The Apple Event Manager passes this reference constant to the handler each time the handler is called.
fromTypeIsDesc

If the AEGetCoercionHandler function returns TRUE in this parameter, the coercion handler expects the data to be passed as a descriptor record. If the function returns FALSE, the coercion handler expects a pointer to the data.
isSysHandler

Specifies the coercion table from which to get the handler. If the value of this parameter is TRUE, the handler is taken from the system coercion table. If the value is FALSE, the handler is taken from the application coercion table.
RESULT CODES
noErr0No error
memFullErr-108Not enough room in heap zone
errAEHandlerNotFound-1717No coercion handler found

Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996