Function signature:
char * errMessage(int err);
My code:
[DllImport(\"api.dll\")] internal static extern char[] errMessage(int err);
Try using String in the managed side. you might as well set the CharSet to Ansi