如何解开COM端口 [英] How to unlock COM port

查看:220
本文介绍了如何解开COM端口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个必须另一个应用程序之后,工作的应用程序。第二个应用程序,导致COM端口不是在特定情况下被关闭的错误。

I've a application that must work after another application. This second application has a bug that causes COM ports not to be closed in specific circumstances.

我想以编程方式关闭所有COM端口在我的应用程序来确保,有将没有关于报道关闭端口的错误。它是可能的,如果我没有自己的对象打开COM端口?

I would like to close all COM ports programmatically in my application to ensure, that there will be no bugs about close ports reported. Is it possible if I do not own objects that opened COM ports?

我需要的.NET Framework,C#的解决方案。

I need a solution on .NET Framework, C# .

推荐答案

有没有好的,简单的方法:

There is no good, easy way:


  • A 办法是解决其他应用程序;或者,如果这是不可能的,写一个过滤设备驱动程序(类似parport驱动程序,但串行端口,而不是并行口),这将坐在串口硬件驱动程序的顶部,这将暴露多个连接点(一个由使用其他应用程序,它贯穿于底层的真正驱动力,并通过自己的应用程序使用的另一个'后门'......真正的司机只能看到一个客户端,即过滤驱动至极坐在它上面)

  • 轻松办法就是核弹(强行终止)其他进程。

  • A good way is to fix the other application; or if that's impossible, to write a filter device driver (similar to the parport driver but for serial ports instead of parallel ports) which would sit on top of the serial port hardware driver and which would expose more than one connection point (one used by the other application, which passes through to the underlying real driver, and another 'back door' used by your own application ... the real driver would only see one client, i.e. the filter driver wich sits on top of it)
  • An easy way is to nuke (forcibly terminate) the other process.

这篇关于如何解开COM端口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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