Important: The information in this document is obsolete and should not be used for new development.
PBSetVol
You can change the default volume and default directory using thePBSetVolfunction.
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.
--> ioCompletionProcPtrA pointer to a completion routine. <-- ioResultOSErrThe result code of the function. --> ioNamePtrStringPtrA pointer to a pathname. --> ioVRefNumIntegerA volume reference number or a working directory reference number. DESCRIPTION
If you pass a volume reference number inioVRefNum, thePBSetVolfunction 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,PBSetVolmakes the specified directory the default directory, and the volume containing that directory
the default volume.ASSEMBLY-LANGUAGE INFORMATION
The trap macro forPBSetVolis_SetVol.RESULT CODES
noErr 0 No error nsvErr -35 No such volume bdNamErr -37 Bad volume name paramErr -50 No default volume