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>nnetpsstat()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 NNETPSSTAT()
 Determines a print server.s status
------------------------------------------------------------------------------
 Syntax

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

     Netware: 2.2 and 3.11

 Arguments

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

     <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

     NNETPSSTAT() returns the status of <cPServer>:

     Table 27.14:  Return Values of NNETPSSTAT()
     ------------------------------------------------------------------------
     Value   CTPS.CH        Definition 
     ------------------------------------------------------------------------
     -1                     Call error
     0       PSTAT_RUNNING  Normal operation mode
     1       PSTAT_GO_DOWN  Deinitialization phase
     2       PSTAT_DOWN     Deinitialized
     ------------------------------------------------------------------------

 Description

     NOVELL NET PRINT SERVER STATUS
     NNETPSSTAT() allows you to determine if <cPServer> is running in the
     normal operation mode or if its availability is going to end.

 Example

     Determine and display the status of print server PSERVER:

     #include "ctps.ch"

     nStatus=NNETPSSTAT('PSERVER')
     DO CASE
        CASE nStatus=PSTAT_RUNNING
           ? 'Normal operation mode!'
        CASE nStatus=PSTAT_GO_DOWN
           ? 'Deinitialization phase!'
        CASE nStatus=PSTAT_DOWN
           ? 'Deinitialized!'
        OTHERWISE
           ? 'Error!'
     ENDCASE

See Also: NNETPSDOWN()

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