◄Up► ◄Next► ◄Previous► ──────────────────────────────────────────────────────────────────────────── Display-driver initialization occurs when Windows creates the original-device context for the Windows desktop. To create the device context, Windows loads the display driver and calls the driver's initialization routine. Although the initialization routine can carry out any task, many drivers do the following: ♦ Determine whether 386 enhanced-mode Windows screen switching is required ♦ Initialize display hardware ♦ Determine whether mouse trails support is required ♦ Install any modal functions Modal functions have implementations based on CPU type, hardware configuration, or Windows mode of operation. For example, the ExtTextOut function for a 80386 CPU may use 32-bit registers but the same function for a 80826 uses 16-bit registers. In another example, a driver may install cursor functions for a hardware cursor in one hardware configuration and install functions for a software cursor in another. Although a display driver may carry out some hardware initialization in its initialization routine, it should wait until GDI calls the driver's Enable function for a second time before fully initializing the video hardware. The initialization routine returns to Windows if the initialization was successful. Otherwise, it returns zero and Windows immediately terminates. ♦