Carbon


AEGetParamDesc

Header: AEDataModel.h Carbon status: Supported

Gets a copy of the descriptor record for a specified Apple event parameter from an Apple event; typically used when your application needs to pass the extracted data to another function as a descriptor record.

OSErr AEGetParamDesc (
    const AppleEvent *theAppleEvent, 
    AEKeyword theAEKeyword, 
    DescType desiredType, 
    AEDesc *result
);
Parameter descriptions
theAppleEvent

A pointer to the Apple event to get the parameter descriptor from.

theAEKeyword

A keyword that specifies the desired Apple event parameter. Some keyword constants are described in “Keyword Parameter Constants”.

desiredType

The descriptor type for the desired Apple event parameter. For a list of AppleScript’s predefined descriptor types, see “Descriptor Type Constants”.

If the requested Apple event parameter is not of the desired type, the Apple Event Manager attempts to coerce it to the desired type. However, if you pass a value of typeWildCard, no coercion is performed, and the descriptor type of the returned record is the same as the descriptor type of the Apple event parameter.

result

A pointer to a descriptor record. On successful return, a copy of the descriptor record for the specified Apple event parameter, coerced, if necessary, to the descriptor type specified by the desiredType parameter. 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.

DISCUSSION

To get Apple event parameter data for your application to use directly, call AEGetParamPtr. To get a descriptor record for an Apple event parameter to pass on to another Apple Event Manager routine, call AEGetParamDesc.

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)