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> prnstop()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 PrnStop()
------------------------------------------------------------------------------
 Purpose:
 Stop a printer.

 Syntax:
 bResult = PrnStop( wPtrNum, wOutCome )

 Parameters:
 wPtrNum  The printer number.
 wOutCome The job outcome value.

 Returns:
 A boolean value (TRUE or FALSE).

 Description:
 PrnStop() causes the printer wPtrNum to stop servicing print queues and
 stop printing until the printer is restarted, either by PrnStart() or at
 the print server console on the currently logged into print server.

 Parameter wOutCome instructs the print server what to do with the job once
 stopped. Valid values are in the range 0 to 2 as follows:

 0  Place the job on hold in order to be continued later.
 1  Return print job to its queue so that it can be restarted from the
    beginning on this or another printer.
 2  Throw away the print job, cancelling any unprinted part of it.
    wOutCome is typically set to 2.

 NOTE: if wOutCome is set to 1, it is necessary to use QJbRstSet() to
 reset the restart flag for the job being stopped before calling PrnStop().
 This prevents the job from continuing to print from where it stopped.
 Returns TRUE if successful, or FALSE if an error occurs.

 Example:
 // To log in to print server PRINTERS and stop printer 0 in
 // order to do maintenance work on it:
 if( PSWSLogin( "PRINTERS" ) > 0 )
    if( PrnStop( 0 )
       ? "Printer 0 has been stopped"
    endif
 endif

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

 PrnStop() should be called before attempting work on a live printer in
 preference to taking the printer offline, as the latter causes the print
 server to issue a notify warning to alert users of a problem.
 If the printer has had a paper jam, PrnStop() can be used to stop the
 printer followed by a call to PJbRewind() to restart the job at a point
 just before the paper jam occurred.

See Also: PSWSLogin() PrnStart() PrnStatGet() PrnErrStatGet() PJbRewind()

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