The DosPrintJobGetInfo API retrieves information about a particular print job.
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. This API does not have any access authority requirements.
#define INCL_BASE #include <os2.h> #include <pmspl.h> #include <neterr.h> #include <netcons.h> SPLERR SPLENTRY DosPrintJobGetInfo(pszServername, usJobId, uLevel, buf, usBuflen, pusBytesAvail); /* 16 bit */Parameters
See Common Parameter Definitions for descriptions of parameters not defined here.
uLevel
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_BAD_NETPATH │ 53 │ The network path cannot be found. │
├─────────────────────────────┼───────┼────────────────────────────────────────┤
│ ERROR_INVALID_LEVEL │ 124 │ The sLevel parameter is not valid. │
├─────────────────────────────┼───────┼────────────────────────────────────────┤
│ ERROR_MORE_DATA │ 234 │ Additional data is available, but the │
│ │ │ buffer is too small. │
├─────────────────────────────┼───────┼────────────────────────────────────────┤
│ NERR_RemoteOnly │ 2106 │ This operation is not supported on │
│ │ │ workstations. │
├─────────────────────────────┼───────┼────────────────────────────────────────┤
│ NERR_BufTooSmall │ 2123 │ The buffer is too small for fixed- │
│ │ │ length data. │
├─────────────────────────────┼───────┼────────────────────────────────────────┤
│ NERR_JobNotFound │ 2151 │ The print job does not exist. │
├─────────────────────────────┼───────┼────────────────────────────────────────┤
│ NERR_SpoolerNotLoaded │ 2161 │ The spooler service has not been
│
│ │ │ started. │
├─────────────────────────────┼───────┼────────────────────────────────────────┤
│ NERR_InvalidComputer │ 2351 │ The specified computer name is not
│
│ │ │ valid. │
└─────────────────────────────┴───────┴────────────────────────────────────────┘
If you call this API with the buffer length parameter equal to zero, the API returns a value for total bytes available. This technique is useful if you do not know the exact buffer size required.
For information about: