我需要双向进程间通信? [英] I need bidirectional inter-process communication?

查看:80
本文介绍了我需要双向进程间通信?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要与在单台计算机上运行的多个EXE应用程序双向通信,与通过专用网络连接到服务器的UDP的同一台计算机上的单个控制EXE应用程序进行通信。网络上有几台计算机都运行相同的应用程序并与其控制应用程序通信。

原始软件是在VB6中使用ActiveX COM为控制应用程序开发的。需要值的计算机上的每个应用程序都通过COM接口从控制应用程序请求它们,然后通过UDP将请求传输到服务器。然后,请求的值将通过回调返回到控制应用程序并返回到请求客户端应用程序。

如何在VB.NET中复制此功能的任何想法将不胜感激。如果可能有其他通知方案,则不强制要求回调。我想避免任何民意调查。



我尝试过:



我尝试在Visual Studio 2008中的可执行文件中使用COM类,它可以在连接一个应用程序时正常工作。尝试登录控制应用程序的第二个应用程序需要一个新实例。

I need to bi-directionally communicate with several EXE apps running on a single computer to a single control EXE app on the same computer that is UDP connected to a Server over a private network. There are several computers on the network all running the same apps and communicating with their control app.
The original software was developed in VB6 using ActiveX COM for the control app. Each app on a computer needing values requested them from the control app through the COM interface which then transferred the request to the server via UDP. The value requested is then returned to the control app and on to the requesting client app by a callback.
Any ideas on how to replicate this functionality in VB.NET would be greatly appreciated. A callback is not mandated if other notification schemes are possible. I'd like to avoid any polling.

What I have tried:

I've tried using a COM Class in an executable in Visual Studio 2008 and it works fine with one app connected. The second app that tries to log on to the control app needs a new instance.

推荐答案

您有一套丰富的替代方案。您可以继续使用 COM VB.NET 可以正常使用它。您可以使用传统的Windows IPC机制(请参阅进程间通信 - Windows应用程序| Microsoft Docs [ ^ ] )。您可以使用 WCF ,例如参见使用WCF进行进程间通信 [ ^ ]。
You have a rich set of alternative. You could continue to use COM, VB.NET works fine with it. You might use a traditional Windows IPC mechanism (see Interprocess Communications - Windows applications | Microsoft Docs[^] ). You could use WCF, see for instance Inter-process communication using WCF[^].


这篇关于我需要双向进程间通信?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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