Your native code is C++ and the name is mangled before export. Possible solutions:
- Use the mangled name in the
EntryPoint
parameter. Find out the mangled name withdumpbin
or Dependency Viewer. - Use a .def file rather than
__declspec(dllexport)
to control which functions are exported. - Suppress mangling with
extern "C"
in your C++ source code.
The final option would look like this:
extern "C"
{
__declspec(dllexport) float RGBCompare()
{
return 100;
}
}