Important: The information in this document is obsolete and should not be used for new development.
CurResFile
You can use theCurResFile
function to get the file reference number of the current resource file.
FUNCTION CurResFile: Integer;DESCRIPTION
TheCurResFile
function returns the file reference number associated with the current resource file. You can call this function when your application starts up (before opening the resource fork of any other file) to get the file reference number of your application's resource fork.If the current resource file is the System file,
CurResFile
returns the actual file reference number. You can use this number or 0 with routines that take a file reference number for the System file. All Resource Manager routines recognize both 0 and the actual file reference number as referring to the System file.ASSEMBLY-LANGUAGE INFORMATION
The current resource file's reference number is stored in the global variableCurMap
.RESULT CODE
noErr 0 No error SEE ALSO
To check for errors, call theResError
function as described on page 1-47.For an example of the use of the
CurResFile
function, see Listing 1-8 on page 1-23.