Important: The information in this document is obsolete and should not be used for new development.
GetIndexedCollectionItemHdl
You can use theGetIndexedCollectionItemHdl
function to copy the variable-length data associated with a collection item into a Macintosh Memory Manager handle, given the item's collection index.
OSErr GetIndexedCollectionItemHdl(Collection source, long index, Handle itemData);
source
- A reference to the collection object containing the item whose data you want to retrieve.
index
- The collection index associated with the item whose data you want to retrieve.
itemData
- A handle to a block of memory to contain the item's data. On return, this memory contains a copy of the data associated with the specified item.
DESCRIPTION
TheGetIndexedCollectionItemHdl
function allows you to obtain a copy of the variable-length data associated with a specific collection item. You specify a collection object using thesource
parameter and you specify an item in that collection using theindex
parameter. If you provide a valid Macintosh Memory Manager handle in theitemData
parameter, the function uses this parameter to return a copy of the variable-length data associated with the specified collection item.RESULT CODES
memFullErr -108 Can't allocate memory. collectionItemNotFoundErr -5751 Can't locate item. SEE ALSO
For information about collection items and their associated collection tags, collection IDs, and variable-length data, see "Collection Items" beginning on page 5-8.For examples using this function, see "Retrieving the Variable-Length Data From an Item" beginning on page 5-33.
To retrieve the data associated with a collection item into a block of memory referenced by a pointer (rather than a handle), use the
GetCollectionItem
function, described on page 5-71.