Important: The information in this document is obsolete and should not be used for new development.
FlattenCollectionToHdlYou use the
FlattenCollectionToHdlutility function to flatten a collection into a Macintosh Memory Manager handle.
OSErr FlattenCollectionToHdl(Collection source Handle flattened);
- The collection that you want to flatten into a handle.
- A handle to contain the flattened data.
DESCRIPTIONThis function flattens the collection referenced by the
sourceparameter into a block of memory referenced by the handle you provide in the
You must provide a valid collection object reference in the
sourceparameter and a valid Macintosh Memory Manager handle in the
flattenedparameter. You may specify a handle of size 0; this function resizes the handle as necessary to hold the flattened data.
memFullErr -108 Can't allocate memory.
SEE ALSOFor 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 flatten a collection directly to disk, use the
FlattenCollectionfunction, described on page 5-88.
To unflatten a collection from a block of memory referenced by a handle, use the
UnflattenCollectionFromHdlfunction, described in the next section.