User Tools

Site Tools


enumerating_20the_20installed_20printers

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

enumerating_20the_20installed_20printers [2018/03/31 13:19]
127.0.0.1 external edit
enumerating_20the_20installed_20printers [2018/04/17 16:05] (current)
tbest3112 Added syntax highlighting
Line 2: Line 2:
  
 //by Richard Russell, February 2014//\\ \\  The following program will list the installed printers:​\\ ​ //by Richard Russell, February 2014//\\ \\  The following program will list the installed printers:​\\ ​
 +<code bb4w>
         SYS "​LoadLibrary",​ "​WINSPOOL.DRV"​ TO winspool%         SYS "​LoadLibrary",​ "​WINSPOOL.DRV"​ TO winspool%
         SYS "​GetProcAddress",​ winspool%, "​EnumPrintersA"​ TO EnumPrinters%         SYS "​GetProcAddress",​ winspool%, "​EnumPrintersA"​ TO EnumPrinters%
Line 13: Line 14:
           PRINT $$!(buffer% + 12*p%)           PRINT $$!(buffer% + 12*p%)
         NEXT p%         NEXT p%
 +</​code>​
 The names displayed correspond to those which you need to use in the ***PRINTER** command, so this routine can be useful in avoiding the **No such printer** error. The names displayed correspond to those which you need to use in the ***PRINTER** command, so this routine can be useful in avoiding the **No such printer** error.
enumerating_20the_20installed_20printers.txt ยท Last modified: 2018/04/17 16:05 by tbest3112