Important: The information in this document is obsolete and should not be used for new development.
InitResources
When the system starts up, it automatically calls theInitResources
function. This routine is for system use only, and your application should not call it at any time.
FUNCTION InitResources: Integer;DESCRIPTION
TheInitResources
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. TheInitResources
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
TheInitResources
function sets up three global variables:SysResName
,SysMap
, andSysMapHndl
. 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.