tianruoocr icon indicating copy to clipboard operation
tianruoocr copied to clipboard

建议更新

Open dsgz1234 opened this issue 5 years ago • 0 comments

建议更新如下API 导入 以对不同语言操作系统的支持。

 [DllImport("kernel32")]
 public static extern int GetPrivateProfileString(string sectionName, string key, string defaultValue, byte[] returnBuffer, int size, string filePath);

 [DllImport("kernel32")]
 public static extern long WritePrivateProfileString(string sectionName, string key, string value, string filePath);

更新为:

[DllImport("kernel32")] public static extern long WritePrivateProfileString(byte[] section, byte[] key, byte[] val, string filePath);
[DllImport("kernel32")] public static extern int GetPrivateProfileString(byte[] section, byte[] key, byte[] def, byte[] retVal, int size, string filePath);

使用时请Encoding.Default.Getbytes()

dsgz1234 avatar Mar 18 '19 03:03 dsgz1234