CloseDriver
short refNum ; device driver reference; as obtained via
CloseDriver closes the device driver indicated by the reference number after first completing any pending I/O. Lastly, the memory used by the driver
is released.
refNum is the reference number of an open device driver. See OpenDriver .
noErr (0) No error
badUnitErr (-21) refNum doesn't match unit table
unitEmptyErr (-22) refNum specifies NIL handle in unit table
dRemoveErr (-25) Tried to remove open driver
Notes: We are warned not to try closing a driver before checking the
consequences of closing it. Individual driver close routines are listed in the
Manager specific to that topic, for example, see the Print Manager for