C# DllImport with c++ const char* not working correctly
- by Shammah
I have the following function in a C++ DLL
extern "C" __declspec(dllexport) bool Exist(const char* name)
{
//if (g_Queues.find(name) != g_Queues.end())
// return true;
//else
// return false;
return false;
}
Inside my C# class I have the following:
[DllImport("Whisper.dll", EntryPoint="Exist", CallingConvention=CallingConvention.Cdecl)]
…