Important: The information in this document is obsolete and should not be used for new development.
MyCoerceDesc
A coercion handler that accepts a descriptor record has the following syntax:
FUNCTION MyCoerceDesc (theAEDesc: AEDesc; toType: DescType; handlerRefcon: LongInt; VAR result: AEDesc): OSErr;
- theAEDesc
- The descriptor record that contains the data to be coerced.
toType
- The desired descriptor type for the resulting descriptor record.
handlerRefcon
- A reference constant that is stored in the coercion dispatch table entry for the handler and passed to the handler by the Apple Event Manager whenever the handler is called.
result
- The resulting descriptor record.
DESCRIPTION
Your coercion handler should coerce the data in the descriptor record to the desired descriptor type and return the resulting data in the descriptor record specified by theresult
parameter. Your handler should return an appropriate result code.SEE ALSO
For more information, see "Writing and Installing Coercion Handlers" on page 4-41.