| |
|
|
| Drucker auflisten, Standard-Drucker ermitteln de Andreas Miethe: KompilierenMarqueSéparation############### ##########
Drucker auflisten
Andreas Miethe * Juni 2003
##########################
DEF EnumPrinters(7) ! WINSPOOL.DRV,EnumPrintersA
DEF GetStandardPrinter(0) Substr$(ReadIni$(WIN.INI,Windows,Device),1,,)
DEF &PRINTER_ENUM_LOCAL 2
DEF &PRINTER_ENUM_DEFAULT 1
Declare PrinterValues#
Proc EnumPrinters
Declare Printername&,Portname&,PrinterName$,PortName$,Attribs&
Declare X&,dwNeeded&,dwReturned&
EnumPrinters(&PRINTER_ENUM_LOCAL,0,5,0,0,ADDR(dwNeeded&),ADDR(dwReturned&))
Dim PrinterValues#,dwNeeded&
Clear PrinterValues#
EnumPrinters(&PRINTER_ENUM_LOCAL ,0, 5, PrinterValues#, dwNeeded&, ADDR(dwNeeded&), ADDR(dwReturned&))
While X& < dwReturned&*20
Printername& = Long(PrinterValues#,x&)
PrinterName$ = String$(Printername&,0)
Attribs& = Long(PrinterValues#,x&+8)
If AND(Attribs&,$4)
Printername$ = Printername$ + => Standarddrucker
endif
Print Printername$
X& = X& + 20
EndWhile
Dispose PrinterValues#
Endproc
cls
EnumPrinters
Print
Print Standard-Drucker :
Print GetStandardPrinter()
waitinput
Salve, iF. |
|
|
| |
|
|
|
E.T. | |
|
| Grüße aus Sachsen... Mario WinXP, Win7 (64 Bit),Win8(.1),Win10, Win 11, Profan 6 - X4, XPSE, und 'nen schwarzes, blinkendes Dingens, wo ich das alles reinschütte... | 10.01.2011 ▲ |
|
|
|