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: More Macintosh Toolbox /
Chapter 1 - Resource Manager / Resource Manager Reference
Resource Manager Routines / Initializing the Resource Manager


InitResources

When the system starts up, it automatically calls the InitResources function. This routine is for system use only, and your application should not call it at any time.

FUNCTION InitResources: Integer;
DESCRIPTION
The InitResources function initializes the Resource Manager. InitResources creates a special heap zone within the system heap and builds a resource map that points to ROM-resident resources. It opens the resource fork of the System file and reads its resource map into memory. The InitResources function returns an integer, which is the file reference number for the System file's resource fork.

Your application does not need to know the file reference number for the System file's resource fork, because every Resource Manager routine with a file reference number parameter also accepts 0 to mean the System file's resource fork.

ASSEMBLY-LANGUAGE INFORMATION
The InitResources function sets up three global variables: SysResName, SysMap, and SysMapHndl. These contain, respectively, the name of the System file's resource fork, the file reference number for the resource fork, and a handle to the System file's resource map.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
6 JUL 1996