예제 #1
0
        public static string GetValue(string key)
        {
            StringBuilder s = new StringBuilder(1024);

            SystemDllFunctions.GetPrivateProfileString("UserConfig", key, "", s, 1024, inifilepath);
            return(s.ToString());
        }
예제 #2
0
 public static void ClearMemory()
 {
     GC.Collect();
     GC.WaitForPendingFinalizers();
     if (Environment.OSVersion.Platform == PlatformID.Win32NT)
     {
         SystemDllFunctions.SetProcessWorkingSetSize(Process.GetCurrentProcess().Handle, -1, -1);
     }
 }
예제 #3
0
 public static void SetValue(string key, string value)
 {
     try
     {
         SystemDllFunctions.WritePrivateProfileString("UserConfig", key, value, inifilepath);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }