Windows 7 SP1如果使用SerialPort.GetPortNames()会出错?

编程入门 行业动态 更新时间:2024-10-27 23:26:02
本文介绍了Windows 7 SP1如果使用SerialPort.GetPortNames()会出错?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

你好. 我正在使用已安装SP1的Windows 7和MS Visual Studio 2010 Prof. 如果使用此代码,我只是发现了一个错误: 字符串[]端口= SerialPort.GetPortNames(); 在.NET 2.0中,结果是:COM5i,COM6i,... 在.NET 3.5中,结果是:COM5i,COM6i,... 在.NET 4.0中,结果是:COM5,COM6,... 在Windows XP SP3中,结果始终是:COM5,COM6,... Windows 7 SP1中有bug吗?

Hello. I''m using Windows 7 with SP1 installed and MS Visual Studio 2010 Prof. I just found a bug if I use this code : string[] ports = SerialPort.GetPortNames(); in .NET 2.0, results are : COM5i, COM6i, ... in .NET 3.5, results are : COM5i, COM6i, ... in .NET 4.0, results are : COM5, COM6, ... in Windows XP SP3, the results are always : COM5, COM6, ... are there bugs in windows 7 SP1 ?

推荐答案

为什么在这里问?转到Microsoft Connect网站,然后在此处发布您的问题. Why are you asking here? Go to the Microsoft Connect web site and post your issue there.

更多推荐

Windows 7 SP1如果使用SerialPort.GetPortNames()会出错?

本文发布于:2023-11-11 04:49:21,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1577424.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:Windows   GetPortNames   SerialPort

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!