Initializing the Video Miniport for Communication with Display Driver
For each adapter found by the PnP manager and successfully configured by the miniport driver, the miniport driver's HwVidInitialize function is called when the corresponding display driver is loaded. HwVidInitialize can initialize software state information, but it should not set up visible state on the adapter. On return from HwVidInitialize, the adapter should be set to the same state as on return from the miniport driver's HwVidResetHw routine. For more information about HwVidResetHw, see Resetting the Adapter in Video Miniport Drivers.
If necessary, a miniport driver's HwVidInitialize function can carry out a one-time initialization operation on the adapter that was postponed by its HwVidFindAdapter function. For example, a miniport driver might postpone loading microcode on the adapter and have the HwVidInitialize function call VideoPortGetRegistryParameters.
When the HwVidInitialize function returns control, the graphics engine has a handle for the miniport driver's adapter. The corresponding display driver then can call the engine's EngDeviceIoControl function to request access to mapped video memory or to request any other operation. The video port driver sends such a request on to the miniport driver's HwVidStartIO function, as a VRP. See Processing Video Requests (Windows 2000 Model) for details.
Usually, a display driver controls the display the end user sees, except occasionally when a full-screen MS-DOS application is run in an x86-based machine running an NT-based operating system. For more information about supporting this feature in VGA-compatible miniport drivers, see VGA-Compatible Video Miniport Drivers (Windows 2000 Model).
The HwVidInitialize function can call VideoPortGetRegistryParameters or VideoPortSetRegistryParameters to get and set configuration information in the registry. For example, HwVidInitialize might call VideoPortSetRegistryParameters to set up nonvolatile configuration information in the registry for the next boot. It might call VideoPortGetRegistryParameters to get adapter-specific, bus-relative configuration parameters written into the registry by an installation program.