Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: Files /
Chapter 2 - File Manager / File Manager Reference
Low-Level Volume Access Routines / Mounting and Unmounting Volumes


PBMountVol

You can use the PBMountVol function to mount a volume.

FUNCTION PBMountVol (paramBlock: ParmBlkPtr): OSErr;
paramBlock
A pointer to a basic FIle Manager parameter block.
<--ioResultOSErrThe result code of the function.
<->ioVRefNumIntegerOn input, a drive number. On output, the volume reference number.

DESCRIPTION
The PBMountVol function mounts the volume in the specified drive. If there are no volumes already mounted, this volume becomes the default volume.

Because you specify the volume to be mounted by providing a drive number, you can use PBMountVol to mount only one volume per disk.

The PBMountVol function always executes synchronously.

Note
The PBMountVol function opens two files needed for maintaining
file catalog and file mapping information. If no access paths are available for these two files, PBMountVol fails and returns tmfoErr
as its function result.
ASSEMBLY-LANGUAGE INFORMATION
The trap macro for PBMountVol is _MountVol.

RESULT CODES
noErr0No error
ioErr-36I/O error
tmfoErr-42Too many files open
paramErr-50Bad drive number
volOnLinErr-55Volume already online
nsDrvErr-56No such drive
noMacDskErr-57Not a Macintosh disk
extFSErr-58External file system
badMDBErr-60Bad master directory block
memFullErr-108Not enough room in heap zone

Previous Book Contents Book Index Next

© Apple Computer, Inc.
2 JUL 1996