Important: The information in this document is obsolete and should not be used for new development.
GetVol
You can use theGetVol
function 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
TheGetVol
function returns a pointer to the name of the default volume in thevolName
parameter and its volume reference number in thevRefNum
parameter. If the default directory has a working directory associated with it, thevRefNum
parameter 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,GetVol
returns a volume reference number in thevRefNum
parameter.RESULT CODES
noErr 0 No error nsvErr -35 No such volume