Question : Inter Process Communication between two VB.NET applications

I have a 64-bit Windows Forms App written in VB.NET 2010 as well as another 32-bit Windows Forms App also written in VB.NET 2010.

I want the 64-bit app to be able to call a single function in the 32-bit app passing a string parameter and have the 32-bit function return a result string:

Dim txtResult As String = SomeRoutineInThe32BitApp("This is a test")
MsgBox (txtResult)

I have read that I can use Sockets, IPC, Named Pipes etc but am wondering what the simplest approach is.

The goal is to eventually call a routine in a legacy 32-bit OCX from a 64-bit process via a 32-bit process that instantiates the 32-bit OCX. I only need to be able to pass a single string and return a single string.




As usual, after 2 hours of surfing and I'm nowhere.

Answer : Inter Process Communication between two VB.NET applications

I just compiled the above apps for Any CPU and it worked as expected. Of course, my problem is that if I reference a 32-bit COM component in the app I get the following exception when trying to instansiate it:

Retrieving the COM class factory for component with CLSID { xxx } failed due to the following error: 80040154

I believe that I simply can't use this type of linkage between two .NET apps if one of them is x64 or Any CPU and the other uses a 32-bit ActiveX control.
Random Solutions  
 
programming4us programming4us