I\'m calling a function from a native DLL which returns a char* pointer, how can I convert the returned pointer to a string ? I tried :
char*
char* c = f
Perhaps the native DLL is actually returning an ANSI string instead of a Unicode string. In that case, call Marshal.PtrToStringAnsi:
Marshal.PtrToStringAnsi
using System.Runtime.InteropServices; ... string s = Marshal.PtrToStringAnsi((IntPtr)c);