Advanced Search
Apple Developer Connection
Member Login Log In | Not a Member? Contact ADC

Previous Book Contents Book Index Next

Inside Macintosh: More Macintosh Toolbox /
Chapter 1 - Resource Manager / Resource Manager Reference
Resource Manager Routines

Opening Resource Forks

To open a resource fork, the Resource Manager calls the appropriate File Manager routine and returns the file reference number that it gets from the File Manager. If the file reference number returned is greater than 0, you can use this number to refer to the resource fork in some other Resource Manager routines.

The FSpOpenResFile, HOpenResFile, OpenRFPerm, and OpenResFile functions all open resource forks. Use the FSpOpenResFile function to open a resource fork using a file system specification (FSSpec) record. You can determine whether FSpOpenResFile is available by calling the Gestalt function with the gestaltFSAttr selector code.

If FSpOpenResFile is not available, you can use HOpenResFile, OpenRFPerm, or OpenResFile to open a resource fork. The HOpenResFile function allows you to specify both a directory ID and a volume reference number, and is therefore preferred if FSpOpenResFile is not available. The OpenRFPerm and OpenResFile functions are earlier versions of HOpenResFile that are still supported but are more restricted in their capabilities.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
6 JUL 1996

Get information on Apple products.
Visit the Apple Store online or at retail locations.

Copyright © 2004 Apple Computer, Inc.
All rights reserved. | Terms of use | Privacy Notice