33 lines
1.1 KiB
C#
33 lines
1.1 KiB
C#
using System;
|
|
using System.Runtime.InteropServices;
|
|
using System.Text;
|
|
|
|
namespace AGVSystem.Cls
|
|
{
|
|
// Token: 0x02000029 RID: 41
|
|
public class FileRW
|
|
{
|
|
// Token: 0x06000247 RID: 583
|
|
[DllImport("kernel32")]
|
|
public static extern long WritePrivateProfileString(string section, string key, string val, string filePath);
|
|
|
|
// Token: 0x06000248 RID: 584
|
|
[DllImport("kernel32")]
|
|
public static extern int GetPrivateProfileString(string section, string key, string def, StringBuilder retVal, int size, string filePath);
|
|
|
|
// Token: 0x06000249 RID: 585 RVA: 0x000507B0 File Offset: 0x0004E9B0
|
|
public static string ReadIniValue(string Section, string Key, string file)
|
|
{
|
|
StringBuilder stringBuilder = new StringBuilder(1024);
|
|
FileRW.GetPrivateProfileString(Section, Key, "", stringBuilder, 1024, file);
|
|
return stringBuilder.ToString();
|
|
}
|
|
|
|
// Token: 0x0600024A RID: 586 RVA: 0x000507E8 File Offset: 0x0004E9E8
|
|
public static long WriteIniValue(string Section, string Key, string value, string file)
|
|
{
|
|
return FileRW.WritePrivateProfileString(Section, Key, value, file);
|
|
}
|
|
}
|
|
}
|