Hi All,
Is there a system call that will return a list
of all the printers or should I just read the
registry?
Many thanks,
-T
On Sun, 27 Jun 2021 23:03:29 -0700, T wrote:
Hi All,
Is there a system call that will return a list
of all the printers or should I just read the
registry?
Many thanks,
-T
Printer API has it.
T,
This one?
https://docs.microsoft.com/en-us/windows/win32/printdocs/enumprinters
Thats one of them. It could not hurt to take a peek at the other functions in that group ("see also", "Print Spooler API Functions") though.
Depending on what exactly you are looking for - all currently usable printers, or just a list of possible ones (with drivers installed for them) or something other - the function(s) you need might differ.
Regards,
Rudy Wieser
This one?
https://docs.microsoft.com/en-us/windows/win32/printdocs/enumprinters
Under Windows 10, I have found the Devices and Printers
does not always list all the printers -- very frustrating
at times.
I find the missing printers by going into any program
with a print dialog and finding them in the pull down.
T,
Under Windows 10, I have found the Devices and Printers
does not always list all the printers -- very frustrating
at times.
I find the missing printers by going into any program
with a print dialog and finding them in the pull down.
Thats pretty-much what I'm talking about : the first might be showing the physical printers you can actually print to and the second a list of /possible/ printers.
Alas, I've got no idea which of the functions returns which group though.
Regards,
Rudy Wieser
but, but, but ...
I wanted to add an OS check to the above program
so it would give me Windows as well as Linux
printers.
On Mon, 28 Jun 2021 14:01:19 -0700, T wrote:
I wanted to add an OS check to the above program
so it would give me Windows as well as Linux
printers.
Linux printers must be made recognizable and accessible by Windows systems from the Linux itself, either as SMB shares, UPnP devices, or Internet Printers.
Found it!
https://docs.microsoft.com/en-us/dotnet/api/system.drawing.printing.printersettings.installedprinters?redirectedfrom=MSDN&view=net-5.0#System_Drawing_Printing_PrinterSettings_InstalledPrinters
Hi All,
Is there a system call that will return a list
of all the printers or should I just read the
registry?
Many thanks,
-T
T,
Found it!
https://docs.microsoft.com/en-us/dotnet/api/system.drawing.printing.printersettings.installedprinters?redirectedfrom=MSDN&view=net-5.0#System_Drawing_Printing_PrinterSettings_InstalledPrinters
I hope you do realize that is .NET specific/dependant ...
I'm fairly sure you can get the same results using the "spool" group of (simple) functions though.
Regards,
Rudy Wieser
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 379 |
Nodes: | 16 (2 / 14) |
Uptime: | 42:18:37 |
Calls: | 8,141 |
Calls today: | 4 |
Files: | 13,085 |
Messages: | 5,857,793 |