Having new technologies does not mean they will completely replace old components. Recently I had to create WCF that will be called by VB6 component. Here I will describe what steps one should follow while doing so, please feel free to post any questions.
WCF can not be directly called by VB6; we need to create a .NET bridge for it. Below is how to create that bridge.
Create a .NET Class Library project
1. What all functionality are intended to be used in COM, create an interface for it. The interface should be public and with the [ComVisible(true)] attribute. If WCF is to be called, then this interface will be same as the contract interface in WCF (except attributes OperationContract and ServiceContract will not be added in .NETBridge interface.)
2. Create .NET class implementing this interface. (Here write all functionality i.e. logic, call service, hit db …)
3. Class should be public and should have following attributes
a. [ClassInterface(ClassInterfaceType.None)]
b. [Guid("<A GUID>")]
c. [ComVisible(true)]
4. In Visual Studio, right click the project node in Solution Explorer. Go to Properties -> Signing
5. Check Sign the assembly. Create a new key (using the dropdown control).
6. Build your application.
7. Open Visual Studio command prompt.
8. Use regasm /tlb:<urDesiredTLB>.tlb <urDLL>.dll i.e.
regasm /tlb: wcfCaller.tlb wcfCaller.dll
…