Carbon


AEPutPtr

Header: AEDataModel.h Carbon status: Supported

Puts data specified in a buffer to a descriptor list as a descriptor record, possibly replacing an existing record in the list.

OSErr AEPutPtr (
    AEDescList *theAEDescList, 
    SInt32 index, 
    DescType typeCode, 
    const void *dataPtr, 
    Size dataSize
);
Parameter descriptions
theAEDescList

A pointer to the descriptor list to add a descriptor record to.

index

A one-based positive integer indicating the position to insert the descriptor record at. If there is already a descriptor record in the specified position, it is replaced.

You can pass a value of zero or count + 1 to add the descriptor record at the end of the list. AEPutPtr returns an error (AEIllegalIndex) if you pass a negative number or a value that is out of range.

typeCode

The descriptor type for the descriptor record to be put into the list. For a list of AppleScript’s predefined descriptor types, see “Descriptor Type Constants”.

dataPtr

A pointer to the data for the descriptor record to add.

dataSize

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

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)