## Presentation Device Driver Reference for OS/2

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

### Device Context

Device contexts provide the mechanism that the application program uses to write output data to devices. The application, or one of its processes, opens a device context with DevOpenDC, associates a presentation space to the DC, and writes or draws in that space. Each DevOpenDC creates an instance of a DC. That instance is eliminated when the application closes the device context. The created DC is seen internally as a dispatch table. Calls from the application program to the DC are passed, as one or more internal Grexxx routines, through the dispatch table to the handling routines in the presentation driver for the DC, or are passed back to the Grexxx simulation routines.

Each instance of a device context has:

Device context types
Data types (for only OD_QUEUED device context type)
Instance data
Program stack