Important: The information in this document is obsolete and should not be used for new development.
KillIO
You can use theKillIO
function to terminate all current and pending I/O requests for a device driver.
pascal OSErr KillIO(short refNum);
refNum
- The driver reference number.
DESCRIPTION
TheKillIO
function stops any current I/O request being processed by the driver specified by theRefNum
parameter, and removes all pending requests from the I/O queue for that driver. The Device Manager calls the completion routine, if any, for each pending request, and sets theioResult
field of each request equal to the result codeabortErr
.The Device Manager passes
KillIO
requests to a driver only if the driver is open and enabled for control calls. If the driver returns an error, the I/O queue is left unchanged and no completion routines are called.
- WARNING
- The
KillIO
function terminates all pending I/O requests for a driver, including requests initiated by other applications.SPECIAL CONSIDERATIONS
The Device Manager always executes theKillIO
function immediately; that is, it never places aKillIO
request in the I/O queue.Although the Device Manager imposes no restrictions on calling
KillIO
at interrupt time, you should consult a device driver's documentation to determine if it supports this.RESULT CODES
noErr 0 No error controlErr -17 Driver does not respond to this control request badUnitErr -21 Driver reference number does not match unit table unitEmptyErr -22 Driver reference number specifies a nil
handle in unit tablenotOpenErr -28 Driver not open SEE ALSO
For information about the low-level function for terminating current and pending I/O requests for a driver, see the next section, which describes thePBKillIO
function.