If you are writing a minidriver or a display driver that uses the DIB engine to perform memory-bitmap operations, you must call the DIB_Enable function when the Enable function is called to get the capability bits. DIB_Enable initializes the dpCurves through dpStyleLen members of the GDIINFO structure. You must call the DIB_Enable function before the Enable function initializes the members of the GDIINFO structure. Minidrivers that do not have an accessible frame buffer should set the NOT_FRAMEBUFFER bit in deFlags.
Each minidriver has to create a PDEVICE structure in a format recognized by the DIB Engine. If the surface being drawn to is video memory, a DIB, or a color device-dependent bitmap (DDB), the PDEVICE is in the format of a DIBENGINE structure. If the surface is a monochrome bitmap, the PDEVICE is in the format of a PBITMAP structure.
A minidriver should call the CreateDIBPDevice function to initialize the PDEVICE except for monochrome bitmaps. In order to call CreateDIBPDevice, you must first allocate and initialize a BITMAPINFO structure and the DIB bits. GDI allocates memory for the PDEVICE. Use the dpDeviceSize field in the GDIINFO structure to obtain the size in bytes of the PDEVICE. A minidriver should call CreateDIBPDevice the when the Enable function is called to enable the adapter.
A minidriver should not call FatalExit if it is not possible to enable the hardware. Instead, the Enable function should return a value indicating failure. This causes the system to reboot into clean Windows with the default VGA driver.
DIB_Enable