Article View: net.micro.mac
Article #1663Re: Getting the vRefNum from a file ref number
From: edmoy
Date: Wed, 05 Jun 1985 18:43
Date: Wed, 05 Jun 1985 18:43
19 lines
1337 bytes
1337 bytes
From poking around with MacsBug, I discovered that the file ref number is the offset within the File-Control-Block Buffer to the file's control block. This buffer is pointed to by fcbSPtr (0x34e). Normally, the System file has a ref number of 2, which skips over the length word at the beginning of the buffer (see Inside Macintosh, File Manager, pg 61). Within the file control block is fcbVPtr (offset 20), a pointer to the volume control block for the file. And within the volume control block is vcbVRefNum (pg 59), the volume reference number. Simple, right?!?!? Good luck! Edward Moy Academic Computing Services University of California Berkeley, CA 94720 edmoy@ucbopal.APRA ucbvax!ucbopal!edmoy
Technical Details
Message-ID:
<248@ucbopal.CC.Berkeley.ARPA>Path:
arc1-ca.pugleaf.net!utzoo!watmath!clyde!bonnie!akgua!whuxlm!harpo!decvax!ucbvax!ucbtopaz!ucbopal!edmoyShow Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83 v7 ucbopal-1.9 BSD 4.2; site ucbopal.CC.Berkeley.ARPA Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!bonnie!akgua!whuxlm!harpo!decvax!ucbvax!ucbtopaz!ucbopal!edmoy From: edmoy@ucbopal.CC.Berkeley.ARPA Newsgroups: net.micro.mac Subject: Re: Getting the vRefNum from a file ref number Message-ID: <248@ucbopal.CC.Berkeley.ARPA> Date: Wed, 5-Jun-85 14:43:42 EDT Article-I.D.: ucbopal.248 Posted: Wed Jun 5 14:43:42 1985 Date-Received: Sun, 9-Jun-85 04:16:16 EDT Organization: Univ. of Calif., Berkeley CA USA Lines: 19