当前位置: 代码迷 >> 综合 >> INF文件写入读出
  详细解决方案

INF文件写入读出

热度:43   发布时间:2024-01-15 23:58:05.0

 库文件

System.Runtime.InteropServices

 

项目

录音系统V3.0(C/S)

 

代码

    class IniFile
    {
        #region 运行变量定义
        public string m_strPath;     //INI文件名
        #endregion

        #region 构造函数及资源回收
        public IniFile(string INIPath)
        {
            m_strPath = INIPath;
        }
        #endregion

        #region API函数声明
        //声明读写INI文件的API函数
        [DllImport("kernel32")]
        private static extern long WritePrivateProfileString(string
            section, string key, string val, string filePath);

        [DllImport("kernel32")]
        private static extern int GetPrivateProfileString(string section, string key, string def, StringBuilder retVal, int size, string filePath);
        #endregion

        #region 共有函数处理

  相关解决方案