This category includes the following APIs:

Printer queue APIs control the printer queues on a server. A printer queue is an ordered list of submitted print jobs on a server. The DosPrintQAdd API creates a printer queue. LAN Server and the APIs in this category control printer queues.

The printer queue APIs use the NETCONS.H, NETERR.H, and PMSPL.H header files, and support 16-bit applications. For 32-bit spooler API support, see the OS/2 Warp, Version 3 Technical Library.

Note: For all the print APIs, DLS applications should use the DOSPRINT.H header file instead of PMSPL.H. Also, you do not need to include OS2.H or #define INCL_BASE.

For example, use:

 #include <dosprint.h>

for DLS applications, instead of:

 #define INCL_BASE
 #include <os2.h>
 #include <pmspl.h>

which is used only for 16-bit OS/2 applications.

For more information about the print categories, see the Presentation Manager Programming Reference Volume 1 and Volume 2, the IBM OS/2 Version 1.3 Programming Guide Technical Update, and the documentation accompanying your IBM OS/2 Programming Toolkit.

A single server or workstation can have multiple printer queues.

The spooler continuously examines the printer queues, waiting for print jobs to be submitted. When a print job is submitted, the spooler determines which of several actions to take by examining certain parameters for the queue. The spooler might spool the print job directly to a print destination, or it might pass the job to a print processor for special processing before printing.

The action taken by the spooler depends on:

When a printer queue is no longer needed, an application can call DosPrintQDel to remove the queue. If print jobs in the printer queue remain to be processed, DosPrintQDel marks the printer queue as PENDING DELETE and deletes it when all jobs have been printed. If no print jobs are pending, DosPrintQDel immediately deletes the printer queue.

An application can pause the operation of a printer queue by calling DosPrintQPause. Pausing a queue suspends processing of all submitted print jobs except the current one. Print jobs can be submitted to a paused queue, but jobs are not spooled to a print destination or print processor until the printer queue is continued through a call to DosPrintQContinue.

To retrieve information about a particular printer queue and its state of operation, an application calls DosPrintQGetInfo. To obtain information about all printer queues on a server, an application calls DosPrintQEnum.

Under extreme circumstances, an application can cancel all pending jobs in a printer queue by calling DosPrintQPurge.


[Back] [Next]