Previous Book Contents Book Index Next

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


You can use the UnmountVol function to unmount a volume that isn't currently
being used.

FUNCTION UnmountVol (volName: StringPtr; vRefNum: Integer): OSErr;
A pointer to the name of a mounted volume.
A volume reference number, a working directory reference number, a drive number, or 0 for the default volume.
The UnmountVol function unmounts the specified volume. All files on the volume (except those opened by the Operating System) must be closed before you call UnmountVol, which does not eject the volume.

Don't unmount the startup volume. Doing so will cause a
system crash.
noErr0No error
nsvErr-35No such volume
ioErr-36I/O error
bdNamErr-37Bad volume name
fBsyErr-47One or more files are open
paramErr-50No default volume
nsDrvErr-56No such drive
extFSErr-58External file system

Previous Book Contents Book Index Next

© Apple Computer, Inc.
2 JUL 1996