In C#, how to call a dll writed in C++?
C# call dll method very easy, when the dll source writed in C#.
But when a dll is writed in C++, how to call it?
I use DllImport to call a function in that dll, but when the application run,
throw a exception said that can't found entry point of the function in dll.
The function in my ctest.dll like below:
int foo
{
int a;
.....
return a;
}
My C# file to call the function below:
[DllImport("ctest.dll",EntyrPoint="foo")]
extern static int foo();
.......
int a = foo(); //Application run here throw exception.
.......
Who know? Please help me. Thanks.