AEPutKeyPtr

Inserts data, a descriptor type, and a keyword into an Apple event record as an Apple event parameter.

Declaration

OSErr AEPutKeyPtr (
   AERecord *theAERecord,
   AEKeyword theAEKeyword,
   DescType typeCode,
   const void *dataPtr,
   Size dataSize
);

Parameters

theAERecord

A pointer to the Apple event record to add a parameter to.

theAEKeyword

The keyword for the parameter to add. If the Apple event record already includes a parameter with this keyword, the parameter is replaced.

Some keyword constants are described in Keyword Parameter Constants.

See AEKeyword.

typeCode

The descriptor type for the parameter to add. For a list of AppleScript’s predefined descriptor types, see Descriptor Type Constants. See DescType.

dataPtr

A pointer to the data for the parameter to add.

dataSize

The length, in bytes, of the data for the parameter to add.

Return Value

A result code. See Result Codes.

Overview

This function is declared as a macro that invokes AEPutParamPtr, which can operate on an Apple event or an Apple event record. See the Discussion for that function for more information.

Version-Notes

See Also

Adding Parameters and Attributes to Apple Events and Apple Event Records

AEPutAttributeDesc

Adds a descriptor and a keyword to an Apple event as an attribute.

AEPutAttributePtr

Adds a pointer to data, a descriptor type, and a keyword to an Apple event as an attribute.

AEPutKeyDesc

Inserts a descriptor and a keyword into an Apple event record as an Apple event parameter.

AEPutParamDesc

Inserts a descriptor and a keyword into an Apple event or Apple event record as an Apple event parameter.

AEPutParamPtr

Inserts data, a descriptor type, and a keyword into an Apple event or Apple event record as an Apple event parameter.