Important: The information in this document is obsolete and should not be used for new development.
FlattenCollectionToHdl
You use theFlattenCollectionToHdlutility function to flatten a collection into a Macintosh Memory Manager handle.
OSErr FlattenCollectionToHdl(Collection source Handle flattened);
source- The collection that you want to flatten into a handle.
flattened- A handle to contain the flattened data.
DESCRIPTION
This function flattens the collection referenced by thesourceparameter into a block of memory referenced by the handle you provide in theflattenedparameter.You must provide a valid collection object reference in the
sourceparameter and a valid Macintosh Memory Manager handle in theflattenedparameter. You may specify a handle of size 0; this function resizes the handle as necessary to hold the flattened data.RESULT CODES
memFullErr -108 Can't allocate memory. 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 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.
 
  
  
 