2.5.1 Video Driver's Device Objects
Figure 2.19 illustrates the device object that represents the video adapter shown previously in Figure 2.5. The NT video port driver shown in Figure 2.6 creates this device object on behalf of a video miniport driver by calling an I/O support routine.
Figure 2.19 Video Device Object
When it is loaded, the NT video port driver creates a device object to represent the video adapter within the system. The NT video port driver also sets up any necessary platform-specific support, such as mapping the I/O space or device registers to system memory in some Windows NT platforms.
In Windows NT machines with more than one video adapter, the NT video port driver creates a separate device object to represent each adapter. To any protected subsystem and its display driver(s), these adapter-specific device objects appear to represent separate instantiations of the NT video port driver.
Each Win32 display driver acquires a handle for the corresponding video miniport driver's device by opening the file object associated with the appropriate device object. After such a display driver obtains the handle, it calls the Win32 subsystem's native functions to control the device. Its device I/O requests are sent as IRPs to the NT video port driver, which provides all necessary NT-dependent, kernel-mode support for both the display and miniport drivers.