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 / Getting and Setting the Current Resource File


HomeResFile

To get the file reference number associated with a particular resource, use the HomeResFile function.

FUNCTION HomeResFile (theResource: Handle): Integer;
theResource
A handle to a resource.
DESCRIPTION
Given a handle to a resource, the HomeResFile function returns the file reference number for the resource fork containing the specified resource. If the given handle isn't a handle to a resource, HomeResFile returns -1, and the ResError function returns the result code resNotFound. If HomeResFile returns 0, the resource is in the System file's resource fork. If HomeResFile returns 1, the resource is ROM-resident.

RESULT CODES
noErr0No error
resNotFound-192Resource not found
SEE ALSO
To check for errors, call the ResError function as described on page 1-47.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
6 JUL 1996