Important: The information in this document is obsolete and should not be used for new development.
AEPutAttributePtr
You can use theAEPutAttributePtr
function to add a pointer to data, a descriptor type, and a keyword to an Apple event as an attribute.
FUNCTION AEPutAttributePtr (theAppleEvent: AppleEvent; theAEKeyword: AEKeyword; typeCode: DescType; dataPtr: Ptr; dataSize: Size): OSErr;
theAppleEvent
The Apple event to which to add an attribute.theAEKeyword
- The keyword for the attribute to be added.
TYPE AEKeyword = PACKED ARRAY[1..4] OF Char;
- The keyword can be any of the constants listed in the description that follows. If the Apple event already included an attribute with this keyword, the attribute is replaced.
typeCode
- The descriptor type for the attribute.
dataPtr
- A pointer to the buffer containing the data to be assigned to the attribute.
dataSize
- The length, in bytes, of the data to be assigned to the attribute.
DESCRIPTION
TheAEPutAttributePtr
function adds the specified pointer to data, descriptor type, and keyword to the specified Apple event as an attribute. You can specify the parametertheAEKeyWord
using any of the following constants:
CONST keyAddressAttr = 'addr'; {address of target } { application} keyEventClassAttr = 'evcl'; {event class} keyEventIDAttr = 'evid'; {event ID} keyEventSourceAttr = 'esrc'; {source application} keyInteractLevelAttr = 'inte'; {settings to allow the } { Apple Event Manager to } { bring server application } { to the foreground} keyMissedKeywordAttr = 'miss'; {first required parameter } { remaining in Apple event} keyOptionalKeywordAttr = 'optk'; {list of optional } { parameters for Apple } { event} keyOriginalAddressAttr = 'from'; {address of original source } { of Apple event} keyReturnIDAttr = 'rtid'; {return ID for reply Apple } { event} keyTimeoutAttr = 'timo'; {length of time in ticks } { that client will wait } { for reply or result from } { the server} keyTransactionIDAttr = 'tran'; {transaction ID identifying } { a series of Apple events}RESULT CODES
noErr 0 No error memFullErr -108 Not enough room in heap zone errAECoercionFail -1700 Data could not be coerced to the requested descriptor type errAENotAEDesc -1704 Not a valid descriptor record