Port drivers are dynamic link libraries (DLLs) that contain a set of 32-bit functions, which provide helper functions for the spooler and Workplace Shell. The file type of a port driver is ".PDR".
There are two types of port drivers-the "old-style" port drivers written to run under OS/2 Version 2.x, and the "new-style" port drivers that will run only on versions of OS/2 that contain the bidirectional print spooler (OS/2 Warp, Version 3 and higher). See the "Bidirectional Communications" chapter in the Printer Device Driver Reference for Os/2 for a description of the bidirectional spooler and its new interfaces.
The OS/2 2.x port driver DLLs required a physical port device driver (.SYS file) installed in the CONFIG.SYS file. These port drivers were only called at the beginning (SplPdInitPort) and at the end (SplPdTermPort) of each print job being sent to the port.
The OS/2 Warp, Version 3 port driver interface passes all print job data to the port driver and allows the port driver to return information returned by the printer. SplPdInitPort and SplPdTermPort are no longer necessary. Applications and print drivers can use the new PrtQuery API to get information about the printer. This API is useful for the printer driver when displaying its printer properties. See PrtQuery in Device Support Function Reference for a description of the API, its format and syntax. The file type of a port driver is .PDR.
The operating system, by default, provides two port drivers; SERIAL.PDR supports COM1 - 4, and PARALLEL.PDR supports LPT1 - 3. For any other port, the supplier of the physical port software is responsible for providing a Presentation Manager port driver if it is necessary.
The functions exported from a port driver are:
OS/2 Warp, Version 3 port drivers must export the following APIs to replace SplPdInitPort and SplPdTermPort:
OS/2 Warp, Version 3 port drivers can export the following optional APIs: