Can you please provide an example of using EnumPrinterData function in Delphi to get a list of printers in system?
Asked
Active
Viewed 764 times
1 Answers
3
To get a simple list of installed printers, you don't need EnumPrinterData
. You can use TPrinter.Printers
property:
for I := 0 to Printer.Printers.Count - 1 do
Writeln(Printer.Printers[I]);

Ondrej Kelle
- 36,941
- 2
- 65
- 128
-
Correct. The EnumPrinterData function enumerates configuration data for a specified printer. – Uwe Raabe Jun 05 '10 at 12:15
-
I need some function to check if the spoolsv service is not hanging. Is enumerating Printers collection good for this? – Vladislav Rastrusny Jun 05 '10 at 12:59
-
1I'm not sure, perhaps you could use QueryServiceStatus. – Ondrej Kelle Jun 05 '10 at 13:42