Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Communicate with WCF Windows Service in VB6?

I have a VB6 application that I want to communicate with a WCF Windows Service that I have written which imports Security Certificates. The only function in the service takes two string arguments. I have been having a lot of difficulty getting the two programs to communicate however.

In VB.NET, it is easy, just make a reference to the service as you would a web service. In VB6, however, it is not so simple it seems. Searching only seems to pull up examples of how to WRITE a Windows service in VB6.

Anyone know how this is done?

like image 989
CodeWarrior Avatar asked Sep 30 '11 20:09

CodeWarrior


1 Answers

The easyest way I have found to access a WCF service from VB6 is to create a .Net ComObject wrapper for the service client. Then in VB6 all your are doing is a create object and calling some methods on the object. All the WCF work takes place in the .Net com object.

like image 90
user957902 Avatar answered Nov 08 '22 20:11

user957902