Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!olivea!apple!keith From: keith@Apple.COM (Keith Rollin) Newsgroups: comp.sys.mac.programmer Subject: Re: How do you open your application's own data fork? Message-ID: <54493@apple.Apple.COM> Date: 1 Jul 91 00:12:41 GMT References: <1991Jun29.002528.4831@neon.Stanford.EDU> Organization: Apple Computer Inc., Cupertino, CA Lines: 19 In article <1991Jun29.002528.4831@neon.Stanford.EDU> commons@Sunburn.Stanford.EDU (Peter Commons) writes: >The title says it all. I want to store and retrieve data from an application's >own data fork. How do you open it/ get a reference number for it? Well, opening the file gets you the reference number, so that part's easy. Now we just have to figure out how to open it. The idea that immediately occurs to me is to get the application's resource fork refNum by calling CurResFile() at the start of your application. Next, find the location and name of the resource file by calling GetFCBInfo(). That will give you the vRefNum, dirID, and file name that you need to call HOpen(). -- ------------------------------------------------------------------------------ Keith Rollin --- Apple Computer, Inc. INTERNET: keith@apple.com UUCP: {decwrl, hoptoad, nsc, sun, amdahl}!apple!keith "But where the senses fail us, reason must step in." - Galileo