NT driver writers can create driver-specific private IO_ERR_XXX codes of type NTSTATUS within the driver’s xxxlog.mc resource file.
The NTSTATUS Facility field, shown in Figure 16.5, for such an error must be set to FACILITY_IO_ERROR_CODE. The driver writer must supply a Sev value and a unique Code value for each new IO_ERR_XXX. Such a driver also must set the C bit in its new IO_ERR_XXX.
The Sev field shown in Figure 16.5 indicates the severity code, which must be one of the following system-defined values:
While STATUS_PENDING also belongs to the STATUS_SEVERITY_SUCCESS category, NT
drivers would not log an error on a pending IRP.
Most public IO_ERR_XXX constants belong to the STATUS_SEVERITY_ERROR category.
If the designer of an NT driver decides to make a set of driver-defined errors visible to system administrators or end users through the Win32 event viewer, such a driver must set itself up as an error-logging component in the registry, as described in Section 16.8.4.