16.6.6 Defining Private NTSTATUS Constants
The writer of a new pair (class/port or video display/miniport) of NT drivers also can define driver-specific STATUS_XXX values to communicate information about privately defined IRP_MJ_INTERNAL_DEVICE_CONTROL requests from the lower to the higher driver of the pair.
Such a class driver must map any private STATUS_XXX value to a system-defined NTSTATUS value when it completes an IRP if an existing higher-level driver’s IoCompletion routine might be called for that IRP. For paired display and NT video miniport drivers, the video port driver does the mapping between public STATUS_XXX values and the Win32-defined constants returned by video miniport drivers. For more information about video miniport drivers, see the Graphics Driver Design Guide.
NT driver writers who define private STATUS_XXX values for a set of IRP_MJ_INTERNAL_DEVICE_CONTROL requests should set the Facility field, shown in Figure 16.5, to an appropriate driver-defined constant that identifies the type of device.
NT driver writers also must set the customer code flag, labelled C in Figure 16.5, when they define private NTSTATUS values for add-on drivers, and must set the Sev field with an appropriate value, as described previously in Section 16.6.5