DriverRemoveYou can use the
DriverRemovefunction to remove a device driver's device control entry from the unit table and release the driver resource.
pascal OSErr DriverRemove(short refNum);
- The driver reference number.
DriverRemovefunction removes a device driver's device control entry from the unit table and releases the driver resource. You specify the device driver using the
refNumparameter. You must close the device driver before calling
If the driver is closed,
DriverRemovecalls the Memory Manager function
DisposeHandleto release the device control entry, then sets the corresponding handle in the unit table to
nil. If the driver's
dRAMBasedflag is set,
DriverRemovecalls the Resource Manager function
ReleaseResourceto release the driver resource.
DriverRemovefunction may move memory; you should not call it at interrupt time.
ASSEMBLY-LANGUAGE INFORMATIONThe trap macro for the
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
noErr 0 No error dRemovErr -25 Attempt to remove an open driver