c# system.io.ioexceptionhresult=0x 8007000 d message=数据无效。 解决方案
HResult=0x8007000D
消息=数据无效。 解决方案)
笔者在调试串行端口时遇到了一个奇怪的错误。 错误的详细信息如下。
让我给你看一部分内联代码。
system.io.ioexceptionhresult=0x 8007000 d消息=数据无效。 source=vehiclecollectorstacktrace : atvehiclecollector.calss documents.serialportcaptrue.serial open (ind : ) vehicle collectorvehicle collectorcalss文档 serialportcaptrue.cs : line 228 atvehiclecollector.calss documents.serialportcaptrue.serial port connect (字符串数据库) string stop bits (ind : (vehicle _ object _ client (vehicle collector ) vehicle collector serial portcal RM _ main.form1_ load (对象发送器,事件e ) ind: ) voad vehicle collectorvehicle collector form _ main.cs : line 55 at system.windows.forms.form.onload (eventargs e ) atmetroframework.forms.metro form.ORM (at system.windows.forms.control.create control ) booleanfignorevive at system.windows.forms.create control at system.windows.forms.control.wndproc (messagem ) at system.windows.forms.WM show window (messagem ) ) )。 atmetroframework.forms.metro form.wndproc (messagem ) at system.windows.forms.native window.debuggable calllback (
如下图所示
笔者找了一天的原因,不知道为什么。 我看了我爱AI的博客,寻找自己的也是不是错了。 如下图所示,笔者误将 4096 写成了4069做了整整一天这么小的问题。 笔者太粗心了,记在这里
此外,System.dll中发生了c#串行端口为System.IO.IOException”类型的未处理异常。 此错误还与写入错误的缓存大小有关。
我爱AI的博客地址: http://blog.csdn.net/xpj 8888/article/details/91360924我爱AI
非常感谢。 我很喜欢AI