I have the following C# code
namespace testDll
{
class testDLL
{
public int add(int val)
{
return val + 5;
}
}
}
Created dll using Visual Studio Express 2010 i.e going to projet properties, changing the output type to classlibrary and Make assembly COM visible. Everytime I try to register the dll using regsvr32.exe
I get error dllregisterserver entrypoint was not found
you cannot Register a .net dll with regsvr32.exe. you have to use regasm.exe. look here for a description
generally you just use
furthermore you have to add the ComVisible attribute to your class and every method you want to have comvisible like so