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
| noErr | 0 | No error |
| memFullErr | -108 | Not enough room in heap zone |
| errAEHandlerNotFound | -1717 | No coercion handler found |