GetVRefNum
You can use the GetVRefNum function to get a volume reference number from a file reference number.
FUNCTION GetVRefNum (refNum: Integer; VAR vRefNum: Integer):
OSErr;
refNum
- The file reference number of an open file.
vRefNum
- On exit, the volume reference number of the volume containing the file specified by
refNum.
DESCRIPTION
The GetVRefNum function returns the volume reference number of the volume containing the specified file. If you also want to determine the directory ID of the specified file's parent directory, call the PBGetFCBInfo function.
RESULT CODES
| noErr | 0 | No error |
| rfNumErr | -51 | Bad reference number |