Click here to Skip to main content
15,847,427 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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.
Updated 28-May-19 22:30pm
lmoelleb 29-May-19 3:06am    
How much can you replace? This looks like something you would do with a message bus, but there are other options (UDP as already used, named pipes, …). There is no problem instantiating COM objects from multiple applications at the same time, so it is something implementation specific you encounter, not a general limitation of COM in .NET. And I just need to know... why VS2008? It is kind of... old...
Member 10796859 29-May-19 11:41am    
I can replace all of it. UDP is only used between network computers via the control EXE's. I just need several apps all connecting to the same control EXE through its COM interface. I'm also have implemented a message scheme to provide notifications to the apps but would prefer a bi-directional communication link between the apps and the control EXE. VS2008 is old but it also has a conversion utility to update VB6 to NET. I'm using it as the starting point then migrating to VS2017/2019. There are many apps in the entire solution that have been converted. This is the last one.

1 solution

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[^].
Share this answer
Member 10796859 29-May-19 11:31am    
I am currently trying to implement it using COM but I can only get one app to use the COM interface. The next app that attempts to connect wants its own instantiation. Looks to me like the app wants to treat it as a DLL in its own thread. Maybe I have something wrong? The EXE exposing the COM Class interface must be the only one running on a computer all apps must access the same COM interface.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900