<i id='04ypx'><tr id='04ypx'><dt id='04ypx'><q id='04ypx'><span id='04ypx'><b id='04ypx'><form id='04ypx'><ins id='04ypx'></ins><ul id='04ypx'></ul><sub id='04ypx'></sub></form><legend id='04ypx'></legend><bdo id='04ypx'><pre id='04ypx'><center id='04ypx'></center></pre></bdo></b><th id='04ypx'></th></span></q></dt></tr></i><div id='04ypx'><tfoot id='04ypx'></tfoot><dl id='04ypx'><fieldset id='04ypx'></fieldset></dl></div>

      <legend id='04ypx'><style id='04ypx'><dir id='04ypx'><q id='04ypx'></q></dir></style></legend>

      <tfoot id='04ypx'></tfoot>

        <small id='04ypx'></small><noframes id='04ypx'>

        • <bdo id='04ypx'></bdo><ul id='04ypx'></ul>

      1. 强制关闭 COM 端口

        Force a COM port to close(强制关闭 COM 端口)
        • <small id='jEdYm'></small><noframes id='jEdYm'>

            • <bdo id='jEdYm'></bdo><ul id='jEdYm'></ul>
                <i id='jEdYm'><tr id='jEdYm'><dt id='jEdYm'><q id='jEdYm'><span id='jEdYm'><b id='jEdYm'><form id='jEdYm'><ins id='jEdYm'></ins><ul id='jEdYm'></ul><sub id='jEdYm'></sub></form><legend id='jEdYm'></legend><bdo id='jEdYm'><pre id='jEdYm'><center id='jEdYm'></center></pre></bdo></b><th id='jEdYm'></th></span></q></dt></tr></i><div id='jEdYm'><tfoot id='jEdYm'></tfoot><dl id='jEdYm'><fieldset id='jEdYm'></fieldset></dl></div>
                1. <tfoot id='jEdYm'></tfoot>

                  <legend id='jEdYm'><style id='jEdYm'><dir id='jEdYm'><q id='jEdYm'></q></dir></style></legend>

                    <tbody id='jEdYm'></tbody>
                  本文介绍了强制关闭 COM 端口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我正在开发一个使用 COM 端口与外部控制器通信的应用程序.当我在连接了通信电缆的情况下重新启动 PC 时,Windows (7) 打开了端口,没有运行任何应用程序,因此我无法再访问它.我试图以编程方式关闭它,但它仍然被占用.

                  I'm working on an application that uses COM port for communication with external controller. When I reboot the PC with communication cable connected, Windows (7) opens the port, without any application running, so I can't access it any more. I tried to close it programatically, but it just stays taken.

                  任何人都知道如何强制关闭它,我可以在我的应用程序之前运行任何程序,或者无论如何以编程方式关闭它的方法?

                  Anyone got an idea how can I force it to close, any program I can run before my app, or a way to programatically close it no matter what?

                  推荐答案

                  我没有设法关闭端口,但是经过大量搜索和测试后,我发现了问题的根源.我正在发布解决方案以帮助遇到相同问题的任何人.

                  I didn't manage to close the port, but after a lot of searching and testing I found what was the source of my problems. I'm posting the solution to help anyone who has the same problem.

                  Windows 将连接到串行端口的具有恒定数据流的设备识别为串行鼠标(在此系统中为 Microsoft Serial Ballpoint),并尝试安装它们,在没有任何进程使用它的情况下接管对端口的控制.解决方案是等待 Windows 安装设备(检查鼠标和其他指针设备下的设备管理器),然后禁用它.如果你卸载设备,它会重新安装,问题又回来了.

                  Windows identifies devices with constant data stream connected to serial port as serial mouse (in this system it was Microsoft Serial Ballpoint), and tries to install them, taking over the control over the port without any process using it. The solution is to wait for Windows to install the device (check Device Manager under Mouses And Other Pointing Devices) and then DISABLING it. If you uninstall the device it will be installed again, and the problem is back.

                  感谢所有尝试提供帮助的人,我希望其他人会发现此解决方案有用.

                  Thanks to everyone who tried to help, and I hope others will find this solution useful.

                  这篇关于强制关闭 COM 端口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  Multicast delegate weird behavior in C#?(C# 中的多播委托奇怪行为?)
                  How to store delegates in a List(如何将代表存储在列表中)
                  How delegates work (in the background)?(代表如何工作(在后台)?)
                  Delegate.CreateDelegate() and generics: Error binding to target method(Delegate.CreateDelegate() 和泛型:错误绑定到目标方法)
                  Func Delegate vs Function(函数委托与函数)
                  CreateDelegate with unknown types(具有未知类型的 CreateDelegate)
                      <tbody id='CaZxB'></tbody>

                  • <i id='CaZxB'><tr id='CaZxB'><dt id='CaZxB'><q id='CaZxB'><span id='CaZxB'><b id='CaZxB'><form id='CaZxB'><ins id='CaZxB'></ins><ul id='CaZxB'></ul><sub id='CaZxB'></sub></form><legend id='CaZxB'></legend><bdo id='CaZxB'><pre id='CaZxB'><center id='CaZxB'></center></pre></bdo></b><th id='CaZxB'></th></span></q></dt></tr></i><div id='CaZxB'><tfoot id='CaZxB'></tfoot><dl id='CaZxB'><fieldset id='CaZxB'></fieldset></dl></div>

                      • <tfoot id='CaZxB'></tfoot>
                        1. <small id='CaZxB'></small><noframes id='CaZxB'>

                            <bdo id='CaZxB'></bdo><ul id='CaZxB'></ul>
                            <legend id='CaZxB'><style id='CaZxB'><dir id='CaZxB'><q id='CaZxB'></q></dir></style></legend>