Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Novlib 3.30 Online Reference - <b> prnstatusget()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 PrnStatusGet()
------------------------------------------------------------------------------
 Purpose:
 Get a printer's status.

 Syntax:
 iStatus = PrnStatusGet( wPtrNum )

 Parameters:
 wPtrNum The printer number.

 Returns:
 A numeric value (signed short int).

 The CA-Clipper name for this function is:
 PrnStatGet()

 Description:
 PrnStatusGet() returns the current activity status of the specified
 printer wPtrNum on the currently logged into print server.

 The activity status can be calculated from the following table of return
 codes:

 0  Waiting for a job.
 1  Waiting for the form to be changed.
 2  Printing a job.
 3  Printer has been paused.
 4  Printer has stopped.
 5  Printer is marking the top of form, or ejecting a page.
 6  Printer is ready to go down.
 7  Printer is not connected.

 Returns NOVERRINT if an error occurs.

 Example:
 // To log in to print server PRINTERS and test the status of printer 0:
 if( PSWSLogin ( "PRINTERS" ) > 0 )
    iCode = PrnStatusGet( 0 )
    ? "Printer 0 on print server PRINTERS is "
    DO CASE
       CASE iCode = 0
          ?? "waiting for a job."
       CASE iCode = 1
          ?? "waiting for the form to be changed."
       CASE iCode = 2
          ?? "currently printing a job."
       CASE iCode = 3
          ?? "paused."
       CASE iCode = 4
          ?? "stopped."
       CASE iCode = 5
          ?? "marking top of form, or ejecting."
       CASE iCode = 6
          ?? "ready to go down after down PS request."
       CASE iCode = 7
          ?? "not connected."
       ENDCASE
    endif

 Notes:
 It is only possible to be logged in to one print server at a time.

See Also: PSWSLogin() PrnErrorStatusGet()

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