PBGetVol
You can use thePBGetVolfunction to determine the default volume and default directory.
FUNCTION PBGetVol (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
ThePBGetVolfunction returns, inioNamePtr, a pointer to the name of the default volume (unlessioNamePtrisNIL) and, inioVRefNum, its volume reference number. If a default directory was set with a previous call toPBSetVol, a pointer to its name is returned inioNamePtrand its working directory reference number is returned inioVRefNum. However, if, in a previous call toHSetVol(orPBHSetVol), a working directory reference number was passed in,PBGetVolreturns a volume reference number in theioVRefNumfield.ASSEMBLY-LANGUAGE INFORMATION
The trap macro forPBGetVolis_GetVol.RESULT CODES
noErr 0 No error nsvErr -35 No default volume
Main | Top of Section | What's New | Apple Computer, Inc. | Find It | Feedback | Help