IoIsErrorUserInduced

BOOLEAN
    IoIsErrorUserInduced(

        IN NTSTATUS  Status
        );

IoIsErrorUserInduced determines whether an I/O error encountered while processing a request to a removable-media device was caused by the user.

Parameters

Status
Specifies the current NTSTATUS value, usually within the driver’s DpcForIsr routine.

Return Value

IoIsErrorUserInduced returns TRUE if an I/O request failed because of a user-induced error.

Comments

This routine indicates whether an I/O request failed for one of the following user-correctable conditions:
STATUS_DEVICE_NOT_READY
STATUS_IO_TIMEOUT
STATUS_MEDIA_WRITE_PROTECTED
STATUS_NO_MEDIA_IN_DEVICE
STATUS_UNRECOGNIZED_MEDIA
STATUS_VERIFY_REQUIRED
STATUS_WRONG_VOLUME

If IoIsErrorUserInduced returns TRUE, the removable-media driver must call IoSetHardErrorOrVerifyDevice before completing the IRP.

Callers of IoIsErrorUserInduced must be running at IRQL <= DISPATCH_LEVEL.

See Also

IoSetHardErrorOrVerifyDevice, IoAllocateErrorLogEntry, IoWriteErrorLogEntry