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> prnqueuemodeget() / prnqueuemodeset()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 PrnQueueModeGet() / PrnQueueModeSet()
------------------------------------------------------------------------------
 Purpose:
 Get or set the service mode of a printer queue.

 Syntax:
 iMode = PrnQueueModeGet( wPtrNum )
 iMode = PrnQueueModeSet( wPtrNum, wNewMode )

 Parameters:
 wPtrNum  The printer number.
 wNewMode The new queue service mode.

 Returns:
 A numeric value ( signed short int, range 0 to 3 )

 The CA-Clipper names for these functions are:
 PrnQueMdeGet() / PrnQueMdeSet()

 Description:
 PrnQueueModeGet() returns the current print queue service mode of the
 specified printer wPtrNum on the currently logged into print server.

 Returns NOVERRINT if an error occurs.

 The queue service mode can be determined from the following table of return
 codes:

 0 = Change forms on printer as needed.
     The print server will service jobs as they come in and disregard how
     often the user has to change forms on the printer.
 1 = Minimize form changes within queues on the printer.
     The print server will re-order incoming print jobs from a particular
     print queue, to minimize the need to change forms on the printer.
 2 = Never change forms.
     The print server will ignore form change requests.
 3 = Minimize form changes across queues.
     The print server will reorder incoming print jobs from any print queue
     to minimize the need to change forms on the printer.
     PrnQueueModeSet() sets the printer's service mode to wNewMode. If
     successful, the previous service mode is returned. Returns NOVERRINT
     if an error occurs.

 Example:
 // To log in to print server PRINTERS and display the queue service mode
 // for printer 0:
 if( PSWSLogin ( "PRINTERS" ) > 0 )
    iCode = PrnQueueModeGet( 0 )
    ? "Printer 0 on print server PRINTERS will "
    do case
       case iCode = 0
          ?? "change forms as needed."
       case iCode = 1
          ?? "minimise form changes from a queue."
       case iCode = 2
          ?? "ignore form change requests."
       case iCode = 3
          ?? "minimise form changes from any queue."
    endcase
 endifTo set printer 0 on print server PRINTERS to ignore form change
 requests:if( PSWSLogin ( "PRINTERS" ) > 0 )
    if( PrnQueueModeSet( 0, 2 ) = 2 )
       ? "Printer 0 on print server PRINTERS will now"
       ?? " ignore form change requests."
    endif
 endif

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

See Also: PSWSLogin() PrnStatusGet()

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