To find out what really exported from a DLL and under what name can be found by using some binary dump utility, such as DUMPBIN.EXE (run it under Visual Studio Command Prompt), see
http://msdn.microsoft.com/en-us/library/c1h23y6c%28v=VS.100%29.aspx[
^].
The name you will find can be decorated, see
http://en.wikipedia.org/wiki/Name_mangling[
^]. You should use this exact name as a parameter of the parameter
EntryPoint
of
System.Runtime.InteropServices.DllImportAttribute
, see
http://msdn.microsoft.com/en-us/library/system.runtime.interopservices.dllimportattribute.aspx[
^].
Even if you create your own native DLL file, it can be useful to run the utility and use exact entry point name explicitly through this parameter.
Decorated name can also give you an idea of the function parameters, but this is not reliable. You need to know exact signature and calling conventions of the function to be imported.
—SA