AEGetNthDesc
theAEKeyword, result );
long index ; position of descriptor record in list
AEKeyword * theAEKeyword ; Apple Event keyword AEDesc * result ; Desired descriptor record You can use the AEGetNthDesc function to get a descriptor record from any descriptor list.
specified descriptor list. Your application should call the AEDisposeDesc function to dispose of the resulting descriptor record after your application
has finished using it.
If AEGetNthDesc returns a nonzero result code, it returns a descriptor record of descriptor type typeNull. A descriptor record of this type does not
contain any data.
descriptor record.
The index parameter is the position of the descriptor record to get (for example, 2 specifies the second descriptor record in the list).
The desiredType parameter is the descriptor type of the resulting data; if the coerce it into this type. If the value of desiredType is typeWildCard, no coercion is performed, and the descriptor type of the resulting descriptor
record is the same as the descriptor type of the original descriptor record.
If you are getting data from a list of keyword-specified descriptor records,
the AEGetNthDesc function returns the keyword of the specified descriptor record in the parameter theAEKeyword; otherwise,
descriptor record. This function creates a new descriptor record by copying
the descriptor record from the parameter. Your application is responsible for
descriptor record once you are finished using it.
If the function returns a nonzero result code, a descriptor record with the
typeNull descriptor type is returned. A descriptor record of this type does not
contain any data.
Result codes
noErr (0) No error
memFullErr (-108) Not enough room in heap zone
errAECoercionFail (-1700) Data could not be coerced to descriptor type
errAEDescNotFound (-1701) Descriptor record was not found
errAENotAEDesc (-1704) Not a valid descriptor record
errAEReplyNotArrived (-1718) Reply has not yet arrived