A Microsoft NT-based operating system display driver must implement several graphics DDI functions. Although writing a driver that capitalizes on existing GDI capabilities would be smaller and simpler to write, you should make sure that your driver also implements those operations it can perform more efficiently than GDI.
The display driver graphics DDI functions fall into three groups, each of which is discussed in following topics:
.
.
.
Required Display Driver Functions
显示驱动必须实现的函数
At a minimum, every display driver must:
Enable and disable the graphics hardware.
Supply GDI with information about hardware capabilities.
Enable the drawing surface.
The following table lists the functions that all display drivers must implement. Following DrvEnableDriver, the remaining functions are listed alphabetically. Note that except for DrvEnableDriver, which GDI calls by name, all other display driver functions do not have fixed names,and are listed with pseudonames.
Function Description
DrvEnableDriver
As the initial driver entry point, provides GDI with the driver version number and entry points of optional functions supported.
DrvAssertMode
Resets the video mode for a specified video hardware device.
DrvCompletePDEV
Informs the driver about the completion of device installation.
DrvDisableDriver
Frees all allocated resources for the driver and returns the device to its initially loaded state.
DrvDisablePDEV
When the hardware is no longer needed, frees memory and resources used by the device and any surface created, but not yet deleted.
DrvDisableSurface
Informs the driver that the surface created for the current device is no longer needed.
DrvEnablePDEV
Enables a PDEV.
DrvEnableSurface
Creates a surface for a specified hardware device.
DrvGetModes
Lists the modes supported by a specified video hardware device.
A list of required functions for all graphics drivers appears in Required Graphics Driver Functions.