Important: The information in this document is obsolete and should not be used for new development.
PBHGetVol
You can use thePBHGetVolfunction to determine the default volume and default directory.
FUNCTION PBHGetVol (paramBlock: WDPBPtr; async: Boolean): OSErr;
paramBlock- A pointer to a working directory 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. <-- ioWDProcIDLongIntThe working directory user identifier. <-- ioWDVRefNumIntegerThe volume reference number of the default volume. <-- ioWDDirIDLongIntThe directory ID of the default directory. DESCRIPTION
ThePBHGetVolfunction returns the default volume and directory last set by a call
to eitherPBSetVolorPBHSetVol. The reference number of the default volume is returned inioVRefNum. ThePBHGetVolfunction returns a pointer to the volume's name in theioNamePtrfield. You should pass a pointer to aStr31value if you
want that name returned. If you passNILin theioNamePtrfield, no volume name
is returned.
The volume reference number of the volume on which the default directory exists
- WARNING
- On exit, the
ioVRefNumfield contains a working directory reference number (instead of the volume reference number) if, in the last call toPBSetVolorPBHSetVol, a working directory reference number was passed in this field.![]()
is returned inioWDVRefNum. The directory ID of the default directory is returned
inioWDDirID.ASSEMBLY-LANGUAGE INFORMATION
The trap macro forPBHGetVolis_HGetVol.RESULT CODES
noErr 0 No error nsvErr -35 No default volume