I am currently working on a solution to allow multiple Visual Basic 6 applications to talk and sync with each other. My background is mainly managed C#, but I have a little background with VB6 and C++ and is why a pure managed solution would be optimal for me. Windows Communication Foundation (WCF) was my first choice, but I am struggling to get a basic duplex communication to work. I have successfully gotten the communication, initiated from the VB6 application to the WCF service, to work using WCF monikers, but I also need to be able to push down information to the application without the VB6 requesting it.
In order to get the other side of the communication channel to work (WCF/.NET client to the VB6 application), I have toyed around with a couple of different paradigms. First, I was able to create a WCF COM+ service, which could service requests from the WCF/.NET client and raise and event to the VB6 application. My only complaint with this solution is that events are fired and then forgotten, so I am unable to retrieve an acknowledgement that the VB6 client received and acted on the aforementioned event.
The other solution I toyed with was leveraging WinSock in the VB6 application and opening a socket to listen for requests from the WCF/.NET tcp client. An extension of this model could also be that a duplex channel could be created between the WCF service and the WCF COM+ service. A second tcp/ip duplex channel could be created between the VB6 application and the COM+ application using WinSock on the VB6 side. Even though I have not tested the latter extension, I think it would work.
The ultimate solution for me is the one that has the least amount of unmanaged code. I am reaching out to the SO community for assistance.