I have a c++ program, in which I am trying to load a c# dll. I have got as far as being able to statically load it, by compiling with the "Register for COM Interop" setting, and generating it .tlb file.
From what I could see from other examples, it looks like normally, I should use LoadLibrary and GetProcAddress to get the function address... sometihng like:
m_hHandle = ::LoadLibrary(m_strName);
(see below for c# code)
but I cannot seem to get a valid address, no matter how I play with it....
Am I on the right track at all? I'm trying to get this to work like a plugin...
//------- C# dll being call
public class Class1
public interface ICalculator
int Add(int Number1, int Number2);
// Interface implementation.
public class ManagedClass : ICalculator
public int Add(int Number1, int Number2)
return Number1 + Number2;
//------------ c++ code