DiskEject
DiskEject Eject disk from specified drive
#include <Disks.h> Disk Driver
OSErr DiskEject(drvNum );
short drvNum ; value indicating which drive ejector to activate
returns 16-bit Error Code; 0=no error
DiskEject ejects a disk from a specified logical drive, numbered
sequentially with no gaps for hard coded drive addresses.
drvNum is the logical designation of the drive from which you want to eject
the disk.
Returns: an error return code indicating success or failure of the function. It
will be one of:
noErr (0) No error
nsDrvErr (-56) No such drive
controlErr (-17) Tried to eject hard disk; can't respond to Control call

Notes: The Disk Driver is significantly different from what it was originally. In
particular, it now finds out how many drives are actually connected and
assigns them consecutive numbers. Previously, drives were given specific
numerical designations and a Mac with one internal floppy drive and one
hard disk would number them: 1, 3 (2 belonging to the absent floppy
drive). Now those same drives now are logically numbered 1 and 2.
Regardless of logical numbering, however, each drive location has a
specific reference number. Internal floppy drives (both single and
double-sided) have a reference number of -5 while hard drives have a
reference number of -2.
Apple warns that programs that expect drives to have permanently
assigned numbers based on their physical, electrical, address will have to
be modified to run under the new Disk Driver.