Carbon


AECoerceDesc

Header: AEDataModel.h Carbon status: Supported

Coerces the data in a descriptor record to another descriptor type and creates a descriptor record containing the newly coerced data.

OSErr AECoerceDesc (
    const AEDesc *theAEDesc, 
    DescType toType, 
    AEDesc *result
);
Parameter descriptions
theAEDesc

A pointer to the descriptor record containing the data to coerce.

toType

The desired descriptor type of the resulting descriptor record. For a list of AppleScript’s predefined descriptor types, see “Descriptor Type Constants”.

result

A pointer to a descriptor record. On successful return, a descriptor containing the coerced data and matching the descriptor type specified in toType. On error, a null descriptor. Your application should always call the AEDisposeDesc function to dispose of the resulting descriptor record after it has finished using it.

function result

A result code.

AVAILABILITY

Supported in Carbon. Available in Carbon 1.0.2 and later when running Mac OS 8.1 or later.


© 2000 Apple Computer, Inc. (Last Updated 6/30/2000)