获取silverlight网络打印机列表

发布于 2024-12-06 23:05:12 字数 244 浏览 5 评论 0原文

我想通过silverlight获取网络打印机的列表。我见过一些使用WMI的例子,但它们在Silverlight中不可用,所以,我想知道是否有任何替代方法可以通过silverlight查找网络打印机或至少是已安装的打印机...

还有一个问题< a href="https://stackoverflow.com/questions/6667253/getting-a-list-of-local-printers-silverlight-4">此处

I want to get the list of network printers through silverlight. I have seen a few examples of using WMI, but they are not available in Silverlight, so, I was wondering if there are any alternatives to find network printers through silverlight or at least the installed printers...

There is also a question posted here

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

缘字诀 2024-12-13 23:05:12

在Silverlight 5中,您可以通过PInvoke使用EnumPrinters Win32 API调用。代码相当长,因此我整理了一个示例,展示如何枚举计算机上的打印机。

http://10rem.net/blog /2011/09/27/enumerate-printers-using-pinvoke-in-silverlight-5

对于 Silverlight 4,您就不走运了。

In Silverlight 5, you can use EnumPrinters Win32 API call through PInvoke. The code is pretty long, so I put together a sample that shows how to enumerate the printers on the machine.

http://10rem.net/blog/2011/09/27/enumerating-printers-using-pinvoke-in-silverlight-5

With Silverlight 4, you're out of luck.

時窥 2024-12-13 23:05:12

我的理解是你不能这样做。您无法控制它,它只是由其内置支持移交。这与您无法指定打印机的原因相同 - 它只是不允许这样做。

Its my understanding that you cannot do this. You don't have the control over this, it is simply handed off for its built in support. This is the same reason why you can't specify a printer - it just doesn't allow this.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文