Important: The information in this document is obsolete and should not be used for new development.
UnflattenCollectionFromHdl
You use theUnflattenCollectionFromHdl
utility function to unflatten a collection that was flattened using theFlattenCollectionToHdl
utility function.
OSErr UnflattenCollectionFromHdl(Collection target Handle flattened);
target
- A reference to a collection object in which to store the unflattened information.
flattened
- A handle to the data that was previously flattened.
DESCRIPTION
This function unflattens the information referenced by the handle you provide in the flattened parameter and stores the unflattened collection in the collection object referenced by thetarget
parameter. You must provide a reference to a valid collection object in thetarget
parameter and a valid Macintosh Memory Manager handle in theflattened
parameter.RESULT CODES
memFullErr -108 Can't allocate memory. collectionVersionErr -5753 Unrecognized version/data may be corrupt. SEE ALSO
For examples of this function, see "Reading Collections From and Writing Collections to Disk" beginning on page 5-41.For an example that shows one possible implementation of this function, see "Flattening and Unflattening a Collection" beginning on page 5-37.
To unflatten a collection directly from disk, use the
UnflattenCollection
function, described on page 5-90.To flatten a collection to a block of memory referenced by a handle, use the
FlattenCollectionToHdl
function, described in the previous section.