The DosPrintDestControl API pauses or continues printing on the specified print destination and cancels or restarts a print job on the specified destination.
Restrictions
This API can be called from DLS and OS/2 workstations, but DLS workstations can issue this call only to a remote LAN Server workstation. Administrator authority is required to call this API.
While paused, a print destination cannot accept any new print jobs. If the print destination is idle when the application attempts to restart or delete a print job, DosPrintDestControl returns the error code NERR_Destidle. These operations can succeed only if a job is printing.
#define INCL_BASE #include <os2.h> #include <pmspl.h> #include <neterr.h> #include <netcons.h> SPLERR SPLENTRY DosPrintDestControl(pszServername, pszPrinterName, operation); /* 16 bit */Parameters
See Common Parameter Definitions for descriptions of parameters not defined here.
pszPrinterName
The following table lists the return codes most significant to this API.
(See API Return Codes for a complete
list of return codes.) ┌─────────────────────────────┬───────┬────────────────────────────────────────┐│SYMBOLICCONSTANT
│VALUE│MEANING │
├─────────────────────────────┼───────┼────────────────────────────────────────┤
│ NERR_Success │ 0 │ No errors were encountered. │
├─────────────────────────────┼───────┼────────────────────────────────────────┤
│ ERROR_ACCESS_DENIED │ 5 │ Administrator privilege is required. │
├─────────────────────────────┼───────┼────────────────────────────────────────┤
│ ERROR_BAD_NETPATH │ 53 │ The network path cannot be found. │
├─────────────────────────────┼───────┼────────────────────────────────────────┤
│ ERROR_NETWORK_ACCESS_DENIED │ 65 │ Network access is denied. │
├─────────────────────────────┼───────┼────────────────────────────────────────┤
│ NERR_RemoteOnly │ 2106 │ This operation is not supported on │
│ │ │ workstations. │
├─────────────────────────────┼───────┼────────────────────────────────────────┤
│ NERR_BadTransactConfig │ 2141 │ The server is not configured for
│
│ │ │ transactions. │
├─────────────────────────────┼───────┼────────────────────────────────────────┤
│ NERR_DestNotFound │ 2152 │ The print destination cannot be found.
│
├─────────────────────────────┼───────┼────────────────────────────────────────┤
│ NERR_DestIdle │ 2158 │ This print destination is idle and │
│ │ │ cannot accept control operations. │
├─────────────────────────────┼───────┼────────────────────────────────────────┤
│ NERR_DestInvalidOp │ 2159 │ This print destination request con-
│
│ │ │ tains a control function that is not │
│ │ │ valid. │
├─────────────────────────────┼───────┼────────────────────────────────────────┤
│ NERR_ProcNoRespond │ 2160 │ The printer processor is not │
│ │ │ responding. │
├─────────────────────────────┼───────┼────────────────────────────────────────┤
│ NERR_SpoolerNotLoaded │ 2161 │ The spooler service has not been
│
│ │ │ started. │
├─────────────────────────────┼───────┼────────────────────────────────────────┤
│ NERR_InvalidComputer │ 2351 │ The specified computer name is not
│
│ │ │ valid. │
└─────────────────────────────┴───────┴────────────────────────────────────────┘
For information about: