Important: The information in this document is obsolete and should not be used for new development.
AECoerceDesc
You can use theAECoerceDescfunction to coerce the data in a descriptor record to another descriptor type.
FUNCTION AECoerceDesc (theAEDesc: AEDesc; toType: DescType; VAR result: AEDesc): OSErr;
theAEDesc- The descriptor record whose data is to be coerced.
toType- The desired descriptor type of the resulting descriptor record.
result- The resulting descriptor record.
DESCRIPTION
TheAECoerceDescfunction attempts to create a new descriptor record by coercing the specified descriptor record. Your application is responsible for using theAEDisposeDescfunction to dispose of the resulting descriptor record once you are finished using it.If
AECoerceDescreturns a nonzero result code, it returns a null descriptor record (a descriptor record of typetypeNull, which does not contain any data) unless the Apple Event Manager is not available because of limited memory.RESULT CODES
noErr 0 No error memFullErr -108 Not enough room in heap zone errAECoercionFail -1700 Data could not be coerced to requested descriptor type SEE ALSO
For a list of the descriptor types for which the Apple Event Manager provides coercions, see Table 4-1, which begins on page 4-45.