So, basically I have a DLL written in C# that has a main class called Program.cs that contains a public function getSignature.
I need to import and use that DLL in 2 applications; 1 in VB.NET and another in VB6.
In the VB.NET application, I have imported the DLL and called the function as follows:
Dim myService as String
Dim x As New AccountService.Program
myService = x.getSignature("xxxxxxxxxxxx")
This works like a charm and I get my results.
However, for the VB6 part, things get a little tricky.
I couldn't import the DLL as is and had to use RegAsm to generate a TLB file.
I imported the TLB file in my VB6 app and tried the following:
Dim myService As String
Dim x As AccountService.Program
Set x = New AccountService.Program
myService = x.getSignature("xxxxxxxxxxxx")
However, the I cannot access the getSignature function.
The class Program is accessible but not the function within it.
Can anyone please advise as to what I am doing wrong?
What I have tried:
Dim myService As String
Dim x As AccountService.Program
Set x = New AccountService.Program
myService = x.getSignature("xxxxxxxxxxxx")