For the Presentation Manager interface, hardcopy devices, such as printers and plotters, are queued devices. When an application writes to one of these devices, the presentation driver creates a spool file and writes the data to that file. The data is printed when it is complete and the required device is free.
Two instances of a device context are required to support queued data. The first instance is opened as an OD_QUEUED device by the application. This DC buffers the data, does any processing that is required, and then writes the data to a spool file. The second instance is opened as an OD_DIRECT device by the queue processor. This DC receives data from the spool file, does any processing that is required, and by using the Prtxxx interface, sends the data to the final output destination, such as port, device, or UNC name.
When a device context is opened, the data type given (PM_Q_STD or PM_Q_RAW) is applicable only for the OD_QUEUED device context type.