Error Handling

IoAllocateErrorLogEntry

Allocates and initializes an error log packet; returns a pointer so the caller can supply error log data and call IoWriteErrorLogEntry with the packet.

IoFreeErrorLogEntry

Frees an error log entry allocated by IoAllocateErrorLogEntry.

IoWriteErrorLogEntry

Queues a previously allocated error log packet, filled in by the driver, to the system error logging thread.

IoIsErrorUserInduced

Returns a Boolean value indicating whether an I/O request failed due to one of the following (user-correctable) conditions: STATUS_IO_TIMEOUT, STATUS_DEVICE_NOT_READY, STATUS_UNRECOGNIZED_MEDIA, STATUS_VERIFY_REQUIRED, STATUS_WRONG_VOLUME, STATUS_MEDIA_WRITE_PROTECTED, or STATUS_NO_MEDIA_IN_DEVICE. If the result is TRUE, a removable-media driver must call IoSetHardErrorOrVerifyDevice before completing the IRP.

IoSetHardErrorOrVerifyDevice

Supplies the device object for which the given IRP was failed due to a user-induced error, such as supplying the incorrect media for the requested operation or changing the media before the requested operation was completed. (A file system driver uses the associated device object to send a dialog box to the user; the user can then correct the error or retry the operation.)

IoSetThreadHardErrorMode

Enables or disables error reporting for the current thread using IoRaiseHardError or IoRaiseInformationalHardError.

IoRaiseHardError

Causes a dialog box to be sent to the user indicating that the given IRP was failed on the given device object for an optional VPB, so that the user can correct the error or retry the operation.

IoRaiseInformationalHardError

Causes a dialog box to be sent to the user, showing an I/O error status and optional string supplying more information.

ExRaiseStatus

Raises an error status so that a caller-supplied structured exception handler is called. (This routine is useful only to highest-level drivers that supply exception handlers, in particular to file systems.)

KeBugCheckEx

Brings down the system in a controlled manner, displaying the bug-check code and possibly more information, after the caller discovers an unrecoverable inconsistency that will corrupt the system unless it is brought down. After the system is brought down, this routine displays bug-check and possibly other information. (This routine can be called when debugging under-development drivers. Otherwise, drivers should never call this routine when they can handle an error by failing an IRP and by calling IoAllocateErrorLogEntry and IoWriteErrorLogEntry.)

KeBugCheck

Brings down the system in a controlled manner when the caller discovers an unrecoverable inconsistency that will corrupt the system if the caller continues to run. KeBugCheckEx is preferable.

KeInitializeCallbackRecord

Initializes a bug-check callback record before a device driver calls KeRegisterBugCheckCallback.

KeRegisterBugCheckCallback

Registers the device driver's bug-check callback routine, which is called if a system bug check occurs. Such a driver-supplied routine saves driver-determined state information, such as the contents of device registers, that would not otherwise be written into the system crash-dump file.

KeDeregisterBugCheckCallback

Removes a device driver's callback routine from the set of registered bug-check callback routines.

 

 

Send comments about this topic to Microsoft

Show: