## Presentation Device Driver Reference for OS/2

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

### Device Context Management

Device contexts are opened in response to an application or process calling the DevOpenDC API function. On receiving this call, Presentation Manager loads the presentation driver (if it is not already present and able to support the device context) and issues a series of calls to the enable entry point.

Initially, when the presentation driver has not been enabled for use by the calling application or process, the driver receives the series of calls shown in the following figure. When the driver has been enabled for an application or process, the sequence of calls to enable additional device contexts does not include subfunction FillLogicalDeviceBlock and, depending upon a requirement that the driver posts in the initial enable sequence, includes or excludes FillPhysicalDeviceBlock.

The OS2_PM_DRV_ENABLE entry point handles the DC management functions. Those functions can be placed in three categories:

Transactions involved in opening a DC
Transactions involved in closing a DC
Other DC functions including SaveDC, RestoreDC and ResetDC