GetVRefNum
GetVRefNum Get volume reference number of an open file short fRefNum ; file reference; as obtained via FSOpen, etc. short *vRefNum ; receives volume reference number Given the reference number of an open file, GetVRefNum returns the reference number of the volume on which the file resides.
fRefNum identifies the file whose volume reference you wish to query. This
vRefNum is the address of an unsigned short. Upon return it will contain the volume reference number of the volume containing the file identified
in fRefNum.
noErr (0) No error
rfNumErr (-51) Bad refNum
Notes: You can use the low-level PBGetFCBInfo function to obtain additional
information about any open file.