Windows Driver Kit: Display Devices
Graphics Driver Functions
The topics that follow describe the driver entry point functions, categorizing them as required, required under certain circumstances, and optional.
When a device driver returns an error, it should typically call the GDI EngSetLastError function to report an extended error code. The application program can then retrieve the error code.