Wilson WindowWare Tech Support

WinBatch WinBatch+Compiler WebBatch
Home | Tech Database | Tech BBS | White Papers | Purchase


Printer Extender News

Keywords:	printer control extender


Version 10005

  New functions:

    pGetPrtInfo(s:printer-name, i:request)
      Gets information about a printer.

      "printer-name" can specify a local printer, or a network printer UNC.

      "request" determines the information to be returned, and can be one of
      the following:

        Request   Meaning
        -------   -------
           1 *    (s) Server name, or "" if local printer.
           2      (s) Printer name.
           3      (s) Share name, or "" if not shared.
           4      (s) Port name(s), separated with commas if more than one port.
           5      (s) Driver name.
           6      (s) Comment.
           7      (s) Location.
           8      (s) File name used to create the separator page.
           9      (s) Print processor.
          10      (s) Data type used to record the print job.
          11      (s) Default print-processor parameters.
          12      (i) Printer attributes -- one or more of the following bits:

                           1  PRINTER_ATTRIBUTE_QUEUED
                           2  PRINTER_ATTRIBUTE_DIRECT
                           4  PRINTER_ATTRIBUTE_DEFAULT
                           8  PRINTER_ATTRIBUTE_SHARED
                          16  PRINTER_ATTRIBUTE_NETWORK
                          32  PRINTER_ATTRIBUTE_HIDDEN
                          64  PRINTER_ATTRIBUTE_LOCAL
                         128  PRINTER_ATTRIBUTE_ENABLE_DEVQ
                         256  PRINTER_ATTRIBUTE_KEEPPRINTEDJOBS
                         512  PRINTER_ATTRIBUTE_DO_COMPLETE_FIRST
                        1024  PRINTER_ATTRIBUTE_WORK_OFFLINE
                        2048  PRINTER_ATTRIBUTE_ENABLE_BIDI
                        4096  PRINTER_ATTRIBUTE_RAW_ONLY
                        8192  PRINTER_ATTRIBUTE_PUBLISHED

          13      (i) Priority value that the spooler uses to route print jobs.
          14      (i) Default priority value assigned to each print job.
          15      (i) Earliest time the printer will print a job (specified as minutes elapsed since 12:00 AM GMT)
          16      (i) Latest time the printer will print a job (specified as minutes elapsed since 12:00 AM GMT)
          17 *    (i) Printer status -- one or more of the following bits:

                               1  PRINTER_STATUS_PAUSED
                               2  PRINTER_STATUS_ERROR
                               4  PRINTER_STATUS_PENDING_DELETION
                               8  PRINTER_STATUS_PAPER_JAM
                              16  PRINTER_STATUS_PAPER_OUT
                              32  PRINTER_STATUS_MANUAL_FEED
                              64  PRINTER_STATUS_PAPER_PROBLEM
                             128  PRINTER_STATUS_OFFLINE
                             256  PRINTER_STATUS_IO_ACTIVE
                             512  PRINTER_STATUS_BUSY
                            1024  PRINTER_STATUS_PRINTING
                            2048  PRINTER_STATUS_OUTPUT_BIN_FULL
                            4096  PRINTER_STATUS_NOT_AVAILABLE
                            8192  PRINTER_STATUS_WAITING
                           16384  PRINTER_STATUS_PROCESSING
                           32768  PRINTER_STATUS_INITIALIZING
                           65536  PRINTER_STATUS_WARMING_UP
                          131072  PRINTER_STATUS_TONER_LOW
                          262144  PRINTER_STATUS_NO_TONER
                          524288  PRINTER_STATUS_PAGE_PUNT
                         1048576  PRINTER_STATUS_USER_INTERVENTION
                         2097152  PRINTER_STATUS_OUT_OF_MEMORY
                         4194304  PRINTER_STATUS_DOOR_OPEN
                         8388608  PRINTER_STATUS_SERVER_UNKNOWN
                        16777216  PRINTER_STATUS_POWER_SAVE

          18 *    (i) Number of print jobs queued for the printer.
          19 *    (i) Average pages per minute that have been printed on the printer.


* These items cannot be changed using pSetPrtInfo.

Returns a string or integer value, as indicated.

    pSetPrtInfo(s:printer-name, i:request, s/i:value)
      Sets information for a printer.

      "value" specifies the new value to be set for the item.

      See pGetPrtInfo for additional parameter information.  Note that items
      marked with a (*) are non-writable and cannot be changed using this function.

      Returns 1 on success; 0 if a non-writable item was specified.



Version 10004 Added new request # to pGetDefPrtInf: Request Returns Example ------- ------- ------- 4 Printer share UNC \\SERVER\LASER4 Under Windows NT, if the default printer is controlled by a remote server, this will return the UNC of the print share on the remote server. If the default printer is controlled locally, it will return a blank string (""). Under Windows 95/98, this request # is identical to request #3, and will return the printer port to which the default printer is mapped. Changed the format of the list returned by pGetPrtList(1) to: printer-name|port-name|driver-name|printer-share-UNC "printer-share-UNC" is the same value that's returned by pGetDefPrtInf(4). Increased the maximum list length that can be returned by pGetPrtList from 4K to 64K.
Version 10003 If there is no default printer already set, pAddPrinter and pAddPrtConn will now set the newly-added printer as the default printer.
Version 10002 Fixed pDelPrtConn.
Version 10001 pAddPrtConn and pDelPrtConn now accept the "server" parameter in the format "SERVER" or "\\SERVER". If there is no default printer already installed, pSetDefPrt will fail. Use pSetDefPrtEx instead. On failure, pSetDefPrt and pSetDefPrtEx will return a negative error code, not necessarily -1.
Version 10000 Dec 1, 1998 Initial public release
Article ID:   W14189

Filename:   !!NEWSFLASH!!.txt