如何枚举机器上所有连接的打印机? [英] How to enumerate all connected printers on a machine?

查看:212
本文介绍了如何枚举机器上所有连接的打印机?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述






大家好,

我我试图使用API​​ EnumPrinters()枚举连接到机器的所有打印机,但不幸的是,如果从服务调用它,此API不会提供所有打印机的列表。

有没有人知道为什么这样做正在发生?或实现目标的任何其他替代方案。

THANX提前。



Hi everyone,
I am trying to enumerate all printers connected to a machine using an API EnumPrinters() but unfortunately this API does not give list of all printers if it is called from a service.
Does anyone have any idea why this is happening? or Any other alternative to fulfil the objective.
THANX in advance.

推荐答案

您好,

如果您使用.Net框架并使用C#/ C ++ / F#或VB然后

参考链接:

获取计算机上安装的所有打印机的名称。



谢谢
Hello ,
If you are using .Net framework and using C#/C++/F# or VB then
Refer link :
Gets the names of all printers installed on the computer.

thanks


这篇关于如何枚举机器上所有连接的打印机?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆