PBSetVol
You can change the default volume and default directory using the PBSetVol function.
FUNCTION PBSetVol (paramBlock: ParmBlkPtr; async: Boolean): OSErr;
paramBlock
- A pointer to a basic File Manager parameter block.
async
- A Boolean value that specifies asynchronous (
TRUE) or synchronous (FALSE) execution.
| --> | ioCompletion | ProcPtr | A pointer to a completion routine. |
| <-- | ioResult | OSErr | The result code of the function. |
| --> | ioNamePtr | StringPtr | A pointer to a pathname. |
| --> | ioVRefNum | Integer | A volume reference number or a working directory reference number. |
DESCRIPTION
If you pass a volume reference number in ioVRefNum, the PBSetVol function makes the specified volume the default volume and the root directory of that volume the default directory. If you pass a working directory reference number, PBSetVol makes the specified directory the default directory, and the volume containing that directory
the default volume.
ASSEMBLY-LANGUAGE INFORMATION
The trap macro for PBSetVol is _SetVol.
RESULT CODES
| noErr | 0 | No error |
| nsvErr | -35 | No such volume |
| bdNamErr | -37 | Bad volume name |
| paramErr | -50 | No default volume |