How would I use DLLImport pinvoke to invoke a function i wrote in a class in an unmanaged DLL? It always throws that the entry point doesn't exist in the dll. EX:
class Foo
{
int __declspec(dllexport) Bar() {return 0;}
};
Bar is in the Foo class. when I use pinvoke as:
[DLLImport("Test.dll")]
public static extern int Bar();
When using it i get an exception saying that the entry point does not exist in the DLL. Is it possible to call functions directly from classes?