Important: The information in this document is obsolete and should not be used for new development.
PBHGetVol
You can use thePBHGetVol
function 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.
--> 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. <-- ioWDProcID
LongInt
The working directory user identifier. <-- ioWDVRefNum
Integer
The volume reference number of the default volume. <-- ioWDDirID
LongInt
The directory ID of the default directory. DESCRIPTION
ThePBHGetVol
function returns the default volume and directory last set by a call
to eitherPBSetVol
orPBHSetVol
. The reference number of the default volume is returned inioVRefNum
. ThePBHGetVol
function returns a pointer to the volume's name in theioNamePtr
field. You should pass a pointer to aStr31
value if you
want that name returned. If you passNIL
in theioNamePtr
field, no volume name
is returned.
The volume reference number of the volume on which the default directory exists
- WARNING
- On exit, the
ioVRefNum
field contains a working directory reference number (instead of the volume reference number) if, in the last call toPBSetVol
orPBHSetVol
, 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 forPBHGetVol
is_HGetVol
.RESULT CODES
noErr 0 No error nsvErr -35 No default volume