使用.net从两个或多个应用程序打开一个com端口 [英] Opening a single com port from two or more applications using .net

查看:105
本文介绍了使用.net从两个或多个应用程序打开一个com端口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想从两个或更多应用程序打开一个com端口。任何人都可以在.net中提供一些代码或任何链接来实现这一点吗?我在最近两天搜索互联网,但找不到任何解决方案。我知道,这是可能的,因为我有一些应用程序可以完成这项工作。但是,我必须在我自己的应用程序中编写此功能。



提前谢谢。

I want to open a single com port from two or more applications. can anyone provide a some code or any link for achieving this in .net? I am searching the internet from last two days but, could not find any solution. I know, it is possible, because i have some applications that do this work. But, i have to write this functionality in my own application.

Thanks in advance.

推荐答案

您不能有多个进程打开一个COM端口。如果进程打开了端口,则其他进程将无法打开它。最好的办法是使用简单的TCP / IP,从服务器程序打开端口,从其他应用程序,与服务器交互。
You can not have more than one process opening a com port. If port is opened by a process, other process will simply not be able to open it. Best bet is to use simple TCP/IP, open the port from a server program, from other applications, interact with the server.


这篇关于使用.net从两个或多个应用程序打开一个com端口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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