Important: The information in this document is obsolete and should not be used for new development.
GetVol
You can use theGetVolfunction to determine the current default volume and possibly also the default directory.
FUNCTION GetVol (volName: StringPtr; VAR vRefNum: Integer): OSErr;
volName- A pointer to the name of the default volume.
vRefNum- A volume reference number or a working directory reference number.
DESCRIPTION
TheGetVolfunction returns a pointer to the name of the default volume in thevolNameparameter and its volume reference number in thevRefNumparameter. If the default directory has a working directory associated with it, thevRefNumparameter instead contains a working directory reference number (which encodes both the volume reference number and the default directory ID). However, if, in a previous call toHSetVol(orPBHSetVol), a working directory reference number was passed in,GetVolreturns a volume reference number in thevRefNumparameter.RESULT CODES
noErr 0 No error nsvErr -35 No such volume