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,
-T
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,
-T
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://docs.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
Hi,
Thank you for your update.
I consider that you could use wmi command to get the information.
https://docs.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
Hi Carl,
Way, way too complicated. I only want the printer's name. Port would be nice, but I can live without it.
-T
2 people are following this question.