确定在C#中的打印机的IP地址 [英] Determine the IP Address of a Printer in C#

查看:848
本文介绍了确定在C#中的打印机的IP地址的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想确定打印机的IP地址,使用C#(.NET 2.0)。我只有打印机共享名称设置在Windows操作系统上,格式为 \\计算机名\打印机名称。打印机是一台网络打印机,并具有一个不同的IP地址到PC。没有人有任何指针?

I would like to determine the IP address of a printer, using C# (.NET 2.0). I have only the printer share name as set up on the Windows OS, in the format \\PC Name\Printer Name. The printer is a network printer, and has a different IP address to the PC. Does anyone have any pointers?

在此先感谢您的帮助。

问候,安迪。

推荐答案

检查这个问题:的如何在C#.net打印机信息?。我认为你必须让物业端口名称从WMI属性。

Check this question: How to get Printer Info in C#.NET?. I think that you have to get the property PortName from the WMI properties.

这篇关于确定在C#中的打印机的IP地址的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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