[net.micro.mac] Getting the vRefNum from a file ref number

edmoy@ucbopal.CC.Berkeley.ARPA (06/05/85)

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