Important: The information in this document is obsolete and should not be used for new development.
SetVol
You can change the default volume and default directory using theSetVolfunction.
FUNCTION SetVol (volName: StringPtr; vRefNum: Integer): OSErr;
volName- A pointer to the name of a mounted volume.
vRefNum- A volume reference number or a working directory reference number.
DESCRIPTION
TheSetVolfunction sets the default volume and directory to the values specified in thevolNameandvRefNumparameters. If you pass a volume reference number invRefNumor a pointer to a volume name involName,SetVolmakes the specified volume the default volume and the root directory of that volume the default directory. If you pass a working directory reference number invRefNum,SetVolmakes the specified directory the default directory, and the volume containing that directory the default volume.RESULT CODES
noErr 0 No error nsvErr -35 No such volume bdNamErr -37 Bad volume name paramErr -50 No default volume