Important: The information in this document is obsolete and should not be used for new development.
DriverRemove
You can use theDriverRemovefunction to remove a device driver's device control entry from the unit table and release the driver resource.
pascal OSErr DriverRemove(short refNum);
refNum- The driver reference number.
 DESCRIPTION
TheDriverRemovefunction removes a device driver's device control entry from the unit table and releases the driver resource. You specify the device driver using therefNumparameter. You must close the device driver before callingDriverRemove.If the driver is closed,
DriverRemovecalls the Memory Manager functionDisposeHandleto release the device control entry, then sets the corresponding handle in the unit table tonil. If the driver'sdRAMBasedflag is set,DriverRemovecalls the Resource Manager functionReleaseResourceto release the driver resource.SPECIAL CONSIDERATIONS
TheDriverRemovefunction may move memory; you should not call it at interrupt time.ASSEMBLY-LANGUAGE INFORMATION
The trap macro for theDriverRemovefunction is_DrvrRemove(0xA03E).You place the driver reference number in register D0. When
_DrvrRemovereturns, register D0 contains the result code.
Registers on entry D0 The driver reference number 
Registers on exit D0 Result code RESULT CODES
noErr 0 No error dRemovErr -25 Attempt to remove an open driver