Important: The information in this document is obsolete and should not be used for new development.
Determining Whether the Collection Manager Is Available
The Collection Manager is not available in all system software versions. Therefore, before calling any Collection Manager functions, you should use theGestaltfunction to determine whether the Collection Manager is available. To get information about the Collection Manager, you pass theGestaltfunction thegestaltCollectionMgrVersionselector, as shown in Listing 5-1.Listing 5-1 Determining whether the Collection Manager is available
Boolean CollectionMgrExists(long versionRequired) { long collectionMgrVersion; Boolean exists = (Gestalt(gestaltCollectionMgrVersion, &collectionMgrVersion) == noErr); if (exists) exists = (collectionMgrVersion >= versionRequired); return(exists); }In Listing 5-1, theCollectionMgrExistssample function uses theGestaltfunction to determine whether the Collection Manager is available and, if so, which version is available. If the Collection Manager is available, this sample function tests whether the version number is sufficiently high by comparing it with a specified minimum.You would call this sample function with a line of code such as
exists = CollectionMgrExists(0x01008000); /* version 1.0f0 */You can find out more about theGestaltfunction in the chapter "Gestalt Manager" of Inside Macintosh: Operating System Utilities.
 
  
  
 