예제 #1
0
 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'));
 }
예제 #2
0
 private static extern IntPtr getString(InfoStringName name);