NWPSComGetPrinterStatus(3nw)
NWPSComGetPrinterStatus --
retrieves printer status information
Synopsis
#include <nwps_com.h>
or
#include <nwpsrv.h>
NWCCODE NWAPI NWPSComGetPrinterStatus
(WORD spxID,
WORD printerID,
BYTE NWFAR *status,
BYTE NWFAR *troubleCode,
BYTE NWFAR *active,
BYTE NWFAR *serviceMode,
WORD NWFAR *formNumber,
char NWFAR *formName,
char NWFAR *printerName);
Description
The parameters are as follows:
- spxID
-
(IN) Specifies the SPX connection to the print server.
- printerID
-
(IN) Specifies the printer (0 to maximum number of printers).
- status
-
(OUT) Points to the printer status.
- troubleCode
-
(OUT) Points to the trouble code.
- active
-
(OUT) Points to whether the printer is active: 0=No; 1=Yes.
- serviceMode
-
(OUT) Points to the service mode.
- formNumber
-
(OUT) Points to the number of the mounted form.
- formName
-
(OUT) Points to the name of the form mounted from PRINTDEF.
- printerName
-
(OUT) Points to the name of the printer.
Return values
- 0x0000
-
NWPSE_SUCCESSFUL
- 0x00ED
-
NWPSE_CONNECTION_TERMINATED
- 0x0103
-
NWPSE_BINDERY_LOCKED
- 0x0301
-
NWPSE_NOT_ENOUGH_MEMORY
- 0x0302
-
NWPSE_NO_SUCH_PRINTER
- 0x030C
-
NWPSE_DOWN
- 0x030E
-
NWPSE_NO_RIGHTS
Notices
Before calling NWPSComGetPrinterStatus, the printer number
must be known to the print server. Only status information for printers
that can be accessed on the current SPX connection is returned.
The client must disconnect and establish a new SPX connection
to access printers on other print servers.
status values follow:
- 0
-
NWPS_PSTAT_JOB_WAIT
- 1
-
NWPS_PSTAT_FORM_WAIT
- 2
-
NWPS_PSTAT_PRINTING
- 3
-
NWPS_PSTAT_PAUSED
- 4
-
NWPS_PSTAT_STOPPED
- 5
-
NWPS_PSTAT_MARK_EJECT
- 6
-
NWPS_PSTAT_READY_TO_DOWN
- 7
-
NWPS_PSTAT_NOT_CONNECTED
- 8
-
NWPS_PSTAT_PRIVATE
troubleCode values follow:
- 0
-
NWPS_PRINTER_RUNNING
- 1
-
NWPS_PRINTER_OFFLINE
- 2
-
NWPS_PRINTER_PAPER_OUT
serviceMode values follow:
- 0
-
NWPS_QUEUE_ONLY
- 1
-
NWPS_QUEUE_BEFORE_FORM
- 2
-
NWPS_FORM_ONLY
- 3
-
NWPS FORM BEFORE QUEUE
NWPSComGetPrinterStatus is for operators and users.
Services
Print Server
NCP calls
None
References
NWPSComAttachToPrintServer(3nw),
NWPSComLoginToPrintServer(3nw)
30 January 1998
© 1998 The Santa Cruz Operation, Inc. All rights reserved.