'############### ########## '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