## Printer Device Driver

[prev][next][parent][TOC]

### prde_FillLdb

This is Enable Subfunction 1 of OS2_PM_DRV_ENABLE.

This function sets up the dispatch table for the graphics engine, calls display.dll to get a dispatch table for its entry points, and sets the return flags to tell the engine that:

Bit 0 == 1 Each DC requires its own physical device block.

Bit 1 == 0 Multiple DCs might coexist.

Device/File names in the DevOpenStruc are significant. When the display driver is loaded, the PostScript driver calls the display driver as if the PostScript driver were the graphics engine module. This continues while the PostScript driver is using the display driver as its imaging engine. The display driver sees the DC as a memory DC while the engine sees it as a printer DC.

Note: The initialization process is serialized with semaphores because it is possible for more than one process to have performed an OpenDC at the same time. However, the process must first be placed in the ExitList because when any process grabs a semaphore, the driver must be able to free the semaphore if the process terminates unexpectedly.