Hi,
The code in the program obtains printer information by calling the API interface of printer property.
Just like the information below: System.Drawing.Printing.PrinterSettings
https://learn.microsoft.com/en-us/dotnet/api/system.drawing.printing.printersettings.installedprinters?redirectedfrom=MSDN&view=net-5.0#System_Drawing_Printing_PrinterSettings_InstalledPrinters
Hope this helps and please help to accept as Answer if the response is useful.
Best Regards,
Carl
List of printers? Registyry or API call?
Hi All,
When a program gets a list of printers on the system to print to, is the list coming from a registry read or from an API call? If the registry, where? Is an API call, which one?
Many thanks,
4 answers
Sort by: Most helpful
-
Carl Fan 6,836 Reputation points
2021-06-30T09:37:27.733+00:00 -
Todd Chester 646 Reputation points
2021-06-30T16:11:21.593+00:00 How do I do this WITHOUT .net?
-
Carl Fan 6,836 Reputation points
2021-07-05T10:24:32.917+00:00 Hi,
Thank you for your update.
I consider that you could use wmi command to get the information.
https://learn.microsoft.com/en-us/windows/win32/cimwin32prov/win32-printer
Hope this helps and please help to accept as Answer if the response is useful.
Best Regards,
Carl -
Todd Chester 646 Reputation points
2021-07-05T23:06:30.963+00:00 Hi Carl,
Way, way too complicated. I only want the printer's name. Port would be nice, but I can live without it.
-T