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> prnjobabort()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 PrnJobAbort()
------------------------------------------------------------------------------
 Purpose:
 Abort a currently printing job on the print server.

 Syntax:
 bResult = PrnJobAbort( wPtrNum, wOutCome )

 Parameters:
 wPtrNum  The print server's printer number (range 0 - 15).
 wOutCome The job outcome value.

 Returns:
 A boolean value (TRUE or FALSE).

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

 Description:
 PrnJobAbort() aborts printing the current print job on the printer
 specified by its number wPtrNum. Print server printers are numbered
 0 to 15.

 Parameter wOutCome instructs the print server what to do with the job once
 aborted; valid values are in the range 0 to 2 as follows:

 0  Place the job on hold to be continued later.
 1  Return print job to its queue so that the can be restarted from the
    beginning.
 2  Discard the print job, cancelling any unprinted part of it.
    wOutCome is typically set to 2.

 PrnJobAbort() returns TRUE if successful or FALSE if an error occurs.
 NOTE: if wOutCome is set to 1, the job to be aborted must have its re-start
 flag set using QJbRestartSet() before PrnJobAbort() is called, otherwise
 the job will continue to print from where it left off.

 Example:
 // To log in to print server PRINTERS and abort the job currently
 // printing on printer 0:
 if( PSWSLogin ( "PRINTERS" ) > 0 )
    iJobNo = PJbNumberGet ( 0 )
    lpszQueue = PJbQueueGet ( 0 )
    if( PrnJobAbort ( 0, 2 ) )
       ? "Print job number", iJobNo, "from print queue", lpszQueue
       ??" has now been aborted and thrown away"
    endif
 endif

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

 Users with print server user rights can abort their own print jobs. Only
 users with print server operator rights can abort other users' print jobs.

See Also: PSWSLogin() PSWSLogout() PJbNumberGet() PJbQueueGet()

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