16.6.4 Calling IoWriteErrorLogEntry

When an NT driver has filled in the data for the packet returned by IoAllocateErrorLogEntry, it must call IoWriteErrorLogEntry so the NT error-logging thread will write its entry in the error log file.

Whenever possible, an NT driver should log an error, and fail the IRP if necessary, but continue to run when the driver encounters unusual or unexpected I/O errors.

A retail NT driver should never call KeBugCheckEx (nor KeBugCheck) to bring down the system. However, KeBugCheckEx can be used for debugging under-development drivers.