Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Get printer network name using API for copyfile api
Message
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00883676
Message ID:
00884025
Views:
19
Thanks Anatoliy,

I'll check it out! I was hoping there was an api function that would retrieve all of the printers on a workstations (local, network, etc) so I could scroll a list or array or something and locate the windows printer name and then determine the port or sharename. I know that in the registry the printers are all listed with their port and sharename so I guess I could also search the registry for them? Not quite as efficient though...


>Hi Tracy,
>
>API function EnumPrinters allows to enumerate various groups of printers: PRINTER_ENUM_REMOTE, PRINTER_ENUM_SHARED, PRINTER_ENUM_NETWORK, PRINTER_ENUM_LOCAL...
>
>On return it populates PRINTER_INFO_2 structure, which has member pShareName.
>
>Another candidate is the NetShareEnum that retrieves information about each shared resource on a server or the local computer.
>
>There should be something similar in Shell functionality too.
>
>Code samples on news2news:
>
>Using EnumPrinters function to enumerate locally installed printers
>http://www.news2news.com/vfp/?example=146
>
>Retrieving information about shared resources on the local computer (WinNT/XP)
>http://www.news2news.com/vfp/?example=351
.·*´¨)
.·`TCH
(..·*

010000110101001101101000011000010111001001110000010011110111001001000010011101010111001101110100
"When the debate is lost, slander becomes the tool of the loser." - Socrates
Vita contingit, Vive cum eo. (Life Happens, Live With it.)
"Life is not measured by the number of breaths we take, but by the moments that take our breath away." -- author unknown
"De omnibus dubitandum"
Previous
Reply
Map
View

Click here to load this message in the networking platform