Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- CA-Clipper Tools . Book 4-Appendices - <b>nnetpspsta()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 NNETPSPSTA()
 Queries the status of a print server printer
------------------------------------------------------------------------------
 Syntax

     NNETPSPSTA(<cPServer>,<nPrinter>,[<cServer>|<nConId>])
        --> nStatus

     Netware: 2.2 and 3.11

 Arguments

     <cPServer>  Designates the name of the print server that is
     accessed.

     <nPrinter>  Designates the number of the printer on <cPServer>.
     Values between 0 and 15 are possible.

     <cServer>  Designates the name of the file server used to access
     <cPServer>.  The print server checks login information on <cServer>.
     Therefore, the access rights can therefore depend on the specified file
     server.  Your workstation must be attached to <cServer>.

     <nConId>  Designates the connection ID of your workstation on
     <cServer>.

 Returns

     NNETPSPSTA() returns a numeric value that specifies the current status
     of <nPrinter> on <cPServer>.

     Table 27.11:  Return Values of NNETPSPPSTA()
     ------------------------------------------------------------------------
     Value   CTPS.CH        Definition
     ------------------------------------------------------------------------
     -1                     Call error
     0       PST_WAIT_JOB   Printer waiting for job
     1       PST_WAIT_FORM  Printer waiting for form
     2       PST_PRINT      Printer is processing job
     3       PST_PAUSED     Printer on hold
     4       PST_STOPPED    Printer stopped
     5       PST_MARK       Printer marking top of form
     6       PST_GO_DOWN    Printer ready for deinitialization
     7       PST_NOT_CON    Remote printer not connected
     8       PST_PRIVATE    Remote printer in private mode
     ------------------------------------------------------------------------

 Description

     NOVELL NET PRINT SERVER PRINTER STATUS
     With the aid of NNETPSPSTA(), applications can determine the status of
     <nPrinter> on <cPServer>.

 Example

     Determine the status of printer 0 on print server PSERVER:

     #include "ctps.ch"

     nStat=NNETPSPSTA('PSERVER',0)

     DO CASE
        CASE nStat=PST_WAIT_JOB
           ? 'Printer waiting for job!'
        CASE nStat=PST_WAIT_FORM
           ? 'Printer waiting for form!'
        CASE nStat=PST_PRINT
           ? 'Printer is processing job!'
        CASE nStat=PST_PAUSED
           ? 'Printer on hold!'
        CASE nStat=PST_STOPPED
           ? 'Printer stopped!'
        CASE nStat=PST_MARK
           ? 'Printer is marking top of form!'
        CASE nStat=PST_GO_DOWN
           ? 'Printer ready for deinitialization!'
        CASE nStat=PST_NOT_CON
           ? 'Remote printer not connected!'
        CASE nStat=PST_PRIVATE
           ? 'Remote printer in private mode!'
        OTHERWISE
           ? 'Error!'
     ENDCASE

See Also: NNETPSPROB()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson