Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: QuickDraw GX Environment and Utilities /
Chapter 5 - Collection Manager / Collection Manager Reference
Functions / Working With Macintosh Memory Manager Handles


GetIndexedCollectionItemHdl

You can use the GetIndexedCollectionItemHdl 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
The GetIndexedCollectionItemHdl function allows you to obtain a copy of the variable-length data associated with a specific collection item. You specify a collection object using the source parameter and you specify an item in that collection using the index parameter. If you provide a valid Macintosh Memory Manager handle in the itemData parameter, the function uses this parameter to return a copy of the variable-length data associated with the specified collection item.

RESULT CODES
memFullErr-108Can't allocate memory.
collectionItemNotFoundErr-5751Can'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.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996