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> prnquedel()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 PrnQueDel()
------------------------------------------------------------------------------
 Purpose:
 Delete a queue from the service list of a printer on the print server.

 Syntax:
 bResult = PrnQueDel( wPtrNum, lpszServer,
             lpszQueue, bForce, wOutCome )

 Parameters:
 wPtrNum    The printer number.
 lpszServer The file server name on which the queue exists.
 lpszQueue  The queue name.
 bForce     The force detach flag.
 wOutCome   The outcome value.

 Returns:
 A boolean value (TRUE or FALSE).

 Description:
 PrnQueDel() deletes the print queue lpszQueue on file server
 lpszServer from the service list of printer wPtrNum.

 To call this function it is necessary to be logged into both the file
 server on which the queue exists and the print server on which the printer
 exists.

 The parameter bForce is the force detach flag, which when set to TRUE
 forces the printer to stop servicing the printer immediately. When set to
 FALSE, it waits until the printer has finished servicing the queue.
 Parameter wOutCome instructs the print server what to do with the jobs once
 the queue is detached from the printer. 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 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, the print job being printed must have its
 re-start flag set using QJbRstSet() before PrnQueDel() is called,
 otherwise the job will continue to print from where it left off.
 Returns TRUE if successful, or FALSE if an error occurs.

 Example:
 // To log in to print server PRINTERS and delete print queue
 // PRINTQ_0 from printer 0:
 if( PSWSLogin ( "PRINTERS" ) = 2 )
    if( PrnQueDel( 0, FSNmeGet(), "PRINTQ_0", TRUE, 2 ) )
       ?  "Printer 0 on print server PRINTERS will no longer "
       ?? "service print jobs from PRINTQ_0 on server ", FSNmeGet()
    endif
 endif

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

See Also: PSWSLogin() PrnQueAdd() PrnQueLst()

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