Do you have any idea about how to return a char array or CString from C++ DLL function to c#? converting the char array or CString to a C# string is even better. thank you
I think the best thing would be to export a C function from the DLL which takes a c# StringBuilder as a parameter. e.g:- Code: [DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)] static extern int GetWindowText(IntPtr hWnd, StringBuilder lpString, int nMaxCount);