I'm trying to invoke same function of C++ project to C# project more than once through dll, but the C# project execution terminates soon after invoking the function first time, without even executing the next immediate statement.
C++ Code: extern "C" __declspec(dllexport) char* rev(const char* str) { xxxx xxxx }
C# Code: [DllImport("Tessaract.dll", SetLastError = true)] public static extern string rev([MarshalAs(UnmanagedType.LPStr)] string a);
string x = rev("abcxyz"); string y = rev("xyzabc");
I expect the C++ rev() function to be invoked each time on its call in C# file
Aucun commentaire:
Enregistrer un commentaire