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> prnerrorstatusget()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 PrnErrorStatusGet()
------------------------------------------------------------------------------
 Purpose:
 Get the error status of a printer.

 Syntax:
 iStat = PrnErrorStatusGet( wPtrNum )

 Parameters:
 wPtrNum The printer number.

 Returns:
 A numeric value (signed short int).

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

 Description:
 PrnErrorStatusGet() returns the current problem status of the specified
 printer wPtrNum on the current print server.

 The problem can be determined from the following table of return codes.

 0  No problem with printer.
 1  Printer is Offline.
 2  Printer is out of paper.

 Returns NOVERRINT if an error occurs.

 Example:
 // To log in to print server PRINTERS and test if printer 0 has a problem:
 if( PSWSLogin( "PRINTERS" ) > 0 )
    iCode = PrnErrorStatusGet( 0 )
    ? "Printer 0 on print server PRINTERS is "
    do case
       case iCode = 0
          ?? "OK."
       case iCode = 1
          ?? "Offline."
       case iCode = 2
          ?? "Out of paper."
    endcase
 endif

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

See Also: PSWSLogin() PrnNotifyObjectList() PrnStatusGet()

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