Eject
You can use the Eject function to place a volume offline and eject it.
FUNCTION Eject (volName: StringPtr; vRefNum: Integer): OSErr;
volName
- A pointer to the name of a volume.
vRefNum
- A volume reference number, a working directory reference number, a drive number, or 0 for the default volume.
DESCRIPTION
The Eject function flushes the specified volume, places it offline, and then ejects
the volume.
RESULT CODES
| noErr | 0 | No error |
| nsvErr | -35 | No such volume |
| ioErr | -36 | I/O error |
| bdNamErr | -37 | Bad volume name |
| paramErr | -50 | No default volume |
| nsDrvErr | -56 | No such drive |
| extFSErr | -58 | External file system |