tianruoocr
tianruoocr copied to clipboard
建议更新
建议更新如下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()