将Com端口号更改为特定号码 [英] change Com port number to specific number

查看:96
本文介绍了将Com端口号更改为特定号码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我在系统中安装RFID阅读器时,它显示我的com端口17

但是当我运行应用程序时它不起作用..

当我将com端口从设备管理器属性更改为com 3,它可以正常工作..

i认为com 3在api中是硬编码的...

我不想让客户端从设备管理器更改com端口,

是否有任何改变来自c#代码的com端口的条款..

如果是,请帮助我...

提前使用Thanx

解决方案

嗯......即使你可以,也不会那么容易。问题是COM端口号与设备驱动程序绑定 - 因此您需要在注册表中找到特定的驱动程序设置并调整它们。这是(a)困难,工作盲; (b)危险。我不想这样做,特别是如果它是我无法控制的机器,非常非常特别是如果它是客户端机器。如果你犯了一个小错误... gawd知道客户的其他软件或硬件会发生什么......不是我想要冒的风险。



代替,我会联系RFID阅读器制造商,并解释您的问题 - 他们可能有解决方案,甚至为您创建软件版本。如果没有,我会找到一个不同的RFID阅读器,它不像是对供应有垄断! :笑:

I am having RFID reader when it installs in system it shows me com port 17
but when i run the application it doesn't work..
when i change the com port to com 3 from device manager properties, it works properly..
i think com 3 is hard coded in api...
I don't want to let the client to change com port from device manager,
is there any provision to change com port from c# code..
if yes plz help me...
Thanx in advance

解决方案

Um...Even if you could, it's not going to be easy. The problem is that the COM port number is tied up with the device driver - so you would need to locate the specific driver settings in the registry and and "tweak" them. Which is (a) difficult, working blind; and (b) dangerous. I wouldn't want to do it, particularly if it's a machine outside my control and very, very specifically if it's a client machine. If you make a small mistake...gawd knows what happens with the client's other software or hardware... Not a risk I'd want to take.

Instead, I'd contact the RFID reader manufacturer, and explain your problem - they may have a solution, or even create a software version for you. If not, I'd find a different RFID reader, it's not as if they have a monopoly on supply! :laugh:


这篇关于将Com端口号更改为特定号码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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