I\'m attempting to call the following trivial C function from C#:
SIMPLEDLL_API const char* ReturnString() { return \"Returning a static string!\"; }
Or maybe try to use
[DllImport("SimpleDll")] public static extern IntPtr ReturnString();
and in your calling code, use the Marshal Class
string ret = System.Runtime.InteropServices.Marshal.PtrToStringAnsi(PInvoke.ReturnString());