GDI Communication With the Driver

The driver exports only two functions to GDI: DrvEnableDriver and DrvDisableDriver. All other driver-supported functions are exposed to GDI through an array of pointers. A GDI call to DrvEnableDriver initializes the driver and passes back this list of driver-supported DDI functions. While there are some functions a driver must support, GDI will handle those operations not included in the function list received from the driver’s DrvEnableDriver routine. GDI calls DrvDisableDriver when the driver is to be unloaded. DDI functions are discussed in depth in Supporting the DDI.

GDI makes a large number of services available to the driver. These services fall into two categories: user objects and service routines.