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>nnetpsprob()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 NNETPSPROB()
 Determines the cause of an error for print server printer
------------------------------------------------------------------------------
 Syntax

     NNETPSPROB(<cPServer>,<nPrinter>,[<cServer>|<nConId>])
        --> nProblem

     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 depend on the specified file server.
     Your workstation must be attached to <cServer>.

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

 Returns

     NNETPSPROB() returns a numeric value that specifies the cause of an
     error on <nPrinter> on <cPServer>.

     Table 27.10:  Return Values of NNETPSPROB()
     ------------------------------------------------------------------------
     Value   CTPS.CH        Definition
     ------------------------------------------------------------------------
     -1                     Call error
     0       PPROB_NONE     No problem
     1       PPROB_OFFLINE  Printer is offline
     2       PPROB_NOPAPER  Paper out
     ------------------------------------------------------------------------

 Description

     NOVELL NET PRINT SERVER PRINTER PROBLEM
     With the aid of NNETPSPROB() applications can check to see if <nPrinter>
     on <cPServer> is ready.  For example, this allows you to display an
     error message before a print job is started.

 Example

     Determine the cause of an error for printer 0 on print server PSERVER:

     #include "ctps.ch"

     nProb=NNETPSPROB('PSERVER',0)

     DO CASE
        CASE nProb=PPROB_NONE
           ? 'Ready!'
        CASE nProb=PPORB_OFFLINE
           ? 'Printer offline!'
        CASE nProb=PPROB_NOPAPER
           ? 'No paper!'
        OTHERWISE
           ? 'Error!'
     ENDCASE

See Also: NNETPSPSTA()

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