March 29, 2024, 02:30:19 AM

News:

Own IWBasic 2.x ? -----> Get your free upgrade to 3.x now.........


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.

Brian

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

Brian

billhsln

Will try and test it on a network on Tuesday.

Bill
When all else fails, get a bigger hammer.

fasecero

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.

Brian

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

Brian