Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

建议更新 #9

Open
dsgz1234 opened this issue Mar 18, 2019 · 0 comments
Open

建议更新 #9

dsgz1234 opened this issue Mar 18, 2019 · 0 comments

Comments

@dsgz1234
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant