## Presentation Device Driver Reference for OS/2

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

### File System Emulation

Presentation drivers for hardcopy devices use an internal interface to communicate with the device. Hardcopy drivers do not differentiate between different types of ports- LPT1 (parallel) and COM1 (serial). The Prtxxx API routes the data to the appropriate physical device driver. This API also handles semaphoring the port so that two threads do not intermix their output.

The internal interface is based on the DOS file system calls DosOpen, DosClose, DosWrite, and so forth. Presentation drivers open a device and receive a handle that identifies the device as a file. Subsequent operations such as writing to the device are implemented by writing to the returned handle.

The handle returned by PrtOpen is not an OS/2 file handle, and can only be used in other Prtxxxx APIs.

The following functions are used by the presentation driver:

PrtAbort
PrtClose
PrtDevIOCtl
PrtOpen
PrtWrite

The following functions are new for OS/2 Warp, Version 3:

PrtAbortDoc
PrtResetAbort
PrtNewPage