I have below function on C++ (header)
string __declspec(dllexport) *GetReaders(int& readerCount);
I wrote below method on C# for invoking
[DllImport("ABC.dll", CharSet = CharSet.Auto )]
extern static string[] GetReaders(out IntPtr readercount);
But after run I can got readercount but the app got below error:
Cannot marshal 'return value': Invalid managed/unmanaged type combination.
What is wrong?
I did it by java and work perfectly. But I have problem with .Net.