public string GetString(InfoStringName name) { byte[] buf = new byte[256]; InvokeWithArrayPointer(ref buf, (ptr) => { Marshal.Copy(getString(name), buf, 0, buf.Length); }); return(new string( buf.Select(x => (char)x).ToArray() ).TrimEnd(' ', '\t', '\n', '\0') .Replace('\0', '\n')); }
private static extern IntPtr getString(InfoStringName name);