public static bool WriteIniData(string Section, string Key, string Value, string iniFilePath) { bool result; if (File.Exists(iniFilePath)) { long OpStation = OperateIniFile.WritePrivateProfileString(Section, Key, Value, iniFilePath); result = (OpStation != 0L); } else { result = false; } return(result); }
public static string ReadIniData(string Section, string Key, string NoText, string iniFilePath) { string result; if (File.Exists(iniFilePath)) { StringBuilder temp = new StringBuilder(1024); OperateIniFile.GetPrivateProfileString(Section, Key, NoText, temp, 1024, iniFilePath); result = temp.ToString(); } else { result = string.Empty; } return(result); }