December 14, 2019, 11:18:09 am


IonicWind Snippit Manager 2.xx Released!  Install it on a memory stick and take it with you!  With or without IWBasic!

Enumerating Printers

Started by Brian, February 09, 2019, 08:56:30 am

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.


February 09, 2019, 08:56:30 am Last Edit: February 14, 2019, 06:45:49 am by Brian Pugh
Looking through old code once again, I found this one I wrote 15 years(!) ago, for enumerating local and network printers, and I thought I would bring it up to date

I can't enumerate network printers here, but I am sure it worked when I wrote it, because I worked on a network

Should compile with no problem. Some code from Paul T and very probably other folks



Will try and test it on a network on Tuesday.

When all else fails, get a bigger hammer.


One possible cause: you are setting up 'EnumPrintersA' with the wrong flag. You are using 22 which is decimal. Try using 0x22 instead which should be PRINTER_ENUM_SHARED + PRINTER_ENUM_LOCAL. I don't have a local network so maybe Bill can check on this.


February 14, 2019, 06:45:29 am #3 Last Edit: February 14, 2019, 11:02:44 am by Brian Pugh
Thanks to Bill's testing, and Fasecero's remarks, I have now done a bit of a re-write of this program. See first post to re-download