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> psdown()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 PSDown()
------------------------------------------------------------------------------
 Purpose:
 Down a print server.

 Syntax:
 bResult = PSDown( bForce ,wOutCome )

 Parameters:
 bForce   The FORCE DOWN NOW flag.
 wOutCome The job outcome value.

 Returns:
 A boolean value (TRUE or FALSE).

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

 Description:
 PSDown() downs the print server that is currently logged into. If the
 parameter bForce is set to TRUE PSDown() forces the print server down
 immediately and without warning. If bForce is set to FALSE the print
 server will warn users in the print server's notify list that the
 print server is about to go down.

 The parameter wOutCome instructs the print server what to do with jobs that
 are currently being printed. Valid values are in the range 0 to 2 as
 follows:

 0  Place on hold any jobs currently being printed so that they can
    continue from where they left off when the print server is brought up
    again.
 1  Return print jobs to their queues so that they can be restarted
    from the beginning when the print server is brought up again.
 2  Throw away the print jobs, cancelling any unprinted part of the
    jobs.

 NOTE: if wOutCome is set to 1, it is necessary to use QJbRestartSet() to

 set the restart flags for the current print jobs before calling PSDown().
 This prevents the jobs from continuing to print from where they left off
 when the print server is brought up again.
 PSDown() returns TRUE if the print server was downed successfully, or FALSE
 if an error occurred.

 Example:
 // To log in to and down print server PRINTERS:
 if( PSWSLogin ( "PRINTERS" ) > 0 )
    if( PSDown( FALSE, 2) )
       "Print server PRINTERS is now down"
    endif
 endif
 // To log in to and force down print server PRINTERS and cancel any
 // currently printing jobs.
 if( PSWSLogin ( "PRINTERS" ) > 0 )
    if( PSDown( TRUE, 2 ) )
       "Print server PRINTERS is now down"
    endif
 endif

 Notes:
 It is only possible to be logged in to one print server at a time.
 PSDown() automatically logs out and detaches from the print server once it
 is down.

 This function requires the calling user to be a print server operator.

See Also: PSWSLogin() PSWSLogout() QJbRestartGet() / QJbRestartSet()

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