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

 Syntax:
 bResult = PrnQueAdd( wPtrNum, lpszServer, lpszQueue, wPriority )

 Parameters:
 wPtrNum    The printer number.
 lpszServer The file server name on which the queue exists.
 lpszQueue  The queue name.
 wPriority  The queue's priority level.

 Returns:
 A boolean value (TRUE or FALSE).

 Description:
 PrnQueAdd() adds the print queue lpszQueue on file server lpszServer
 to the service list of printer wPtrNum.

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

 PrnQueAdd() enables the printer wPtrNum to print jobs that are in the
 queue lpszQueue on server lpszServer. The parameter wPriority is the
 priority level of the queue to the printer and can be in the range 1 to
 255.

 If a printer services more than one queue, the jobs in the queues with the
 highest priorites are printed first. In order for PrnQueAdd() to work,
 the print server must already exist in the Q_SERVERS set property value of
 the print queue.

 Returns TRUE if successful, or FALSE if an error occurs.

 Example:
 // To log in to print server PRINTERS and add print queue
 // PRINTQ_0 to printer 0:
 if( PSWSLogin( "PRINTERS" ) = 2 )
    if(!SetPrpIDTst( "PRINTQ_0",3,"PRINTERS",7,"Q_SERVERS" )
       SetPrpIDAdd( "PRINTQ_0",3,"PRINTERS",7,"Q_SERVERS" )
    endif
    if( PrnQueAdd( 0, FSNmeGet(), "PRINTQ_0", 1 ) )
       ? "Printer 0 on print server PRINTERS will now 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() PrnQueDel() PrnQueLst()

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