| Previous | Next |
| STATUS_TOO_MANY_OPENED_FILES | STATUS_CANNOT_DELETE |
STATUS_CANCELLED
Meaning and context of STATUS_CANCELLED
A device's in-progress I/O operation (such as a request to read several blocks from a disk) can be canceled by an application, the system, or a driver. If a device's I/O operation is canceled, the I/O manager attempts to cancel all unprocessed I/O requests that are associated with the I/O operation. The device's drivers can register to be notified when the I/O manager attempts to cancel I/O requests, and the drivers can cancel the requests that they own by completing them with a completion status of STATUS_CANCELLED.
A user-mode application can use the Win32 CancelIo or CancelIoEx functions to cancel a pending request. For more details, see CancelIo
Driver routines that change the state of cancelable IRPs, including all routines that might complete an IRP with STATUS_CANCELLED, must acquire and release the system cancel spin lock according to the guidelines in this section.
Drivers in which IRPs might remain queued for an indefinite interval (so a user could cancel a previously submitted I/O request) must have one or more Cancel routines to complete user-canceled I/O requests. For example, keyboard, mouse, parallel, serial, and sound device drivers (or drivers layered over them) and file system drivers should have Cancel routines. The cancellation process begins when either the system or a driver calls IoCancelIrp. This routine is called for each IRP that is associated with the thread that has not yet fully completed. The system cancels unprocessed IRPs if the thread that initiated the I/O request exits. Drivers can cancel only IRPs that they have created (see Creating IRPs for Lower-Level Drivers.)
Native status interpretation
STATUS_CANCELLED is 0xC0000120, an NTSTATUS error value. AllStat describes it as “The I/O request was canceled.”
Looking for a different code? Search another status or error code.