Important: The information in this document is obsolete and should not be used for new development.
DriverRemove
You can use theDriverRemove
function 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
TheDriverRemove
function removes a device driver's device control entry from the unit table and releases the driver resource. You specify the device driver using therefNum
parameter. You must close the device driver before callingDriverRemove
.If the driver is closed,
DriverRemove
calls the Memory Manager functionDisposeHandle
to release the device control entry, then sets the corresponding handle in the unit table tonil
. If the driver'sdRAMBased
flag is set,DriverRemove
calls the Resource Manager functionReleaseResource
to release the driver resource.SPECIAL CONSIDERATIONS
TheDriverRemove
function may move memory; you should not call it at interrupt time.ASSEMBLY-LANGUAGE INFORMATION
The trap macro for theDriverRemove
function is_DrvrRemove
(0xA03E).You place the driver reference number in register D0. When
_DrvrRemove
returns, 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