Hi,
I am creating a DLL in c# and then trying to use it in VB6
and its failing.
Steps i did are :
1. code
using System.Collections;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Windows.Forms;
namespace MyCalculator
{
public interface Calc
{
int addnum(int aa, int bb);
}
public class CalculatorCLS : Calc
{
public CalculatorCLS()
{
}
public int addnum(int aa, int bb)
{
return aa+bb;
}
}
}
2. compiled with Register with COm interop property as
true.
3. got TLB File.
4. In VB added reference to MyCalculator.tlb file.
5. Dim aa As MyCalculator.Calc
Dim cc As Integer
aa = New MyCalculator.CalculatorCLS
cc = aa.addnum(34, 45)
I get error
"File or Assembly Name MyCalculator, or one of its
dependencies, was not found."
Where I am doing wrong?
Thanks
Sutapa