使用Windows API保存配置参数
2017-08-06 16:24
253 查看
直接看代码吧;
void SetXXXXParams(const CString strApp, const CString strKey, CString& strValue)
{
CString strFilePath = GetDllPath() + _T("Connect.ini");
::WritePrivateProfileString(strApp, strKey, strValue, strFilePath);
}
如调用的时候可以这样传:
CString strPictureAddress = _T("D:\sInfo");
SetFtpAddressParams(_T("FTP_ADDRESS"), _T("FCFHT_PATH"), strPictureAddress);
结果出来就是这样子:
void SetXXXXParams(const CString strApp, const CString strKey, CString& strValue)
{
CString strFilePath = GetDllPath() + _T("Connect.ini");
::WritePrivateProfileString(strApp, strKey, strValue, strFilePath);
}
如调用的时候可以这样传:
CString strPictureAddress = _T("D:\sInfo");
SetFtpAddressParams(_T("FTP_ADDRESS"), _T("FCFHT_PATH"), strPictureAddress);
结果出来就是这样子:
相关文章推荐
- QT如何从配置文件读取参数并保存最近使用的参数
- Azureus研究-配置文件的参数读取和参数保存
- 如何使用web_reg_save_param方法保存的多个参数?
- 解决『回发或回调参数无效。在配置中使用 或在页面中使用 启用了事件验证。』问题
- 回发或回调参数无效。在配置中使用 或在页面中使用 启用了事件验证。出于安全目的,此功能验证回发或回调事件的参数是否来源于最初呈现这些事件的服务器控件。
- vim配置技巧——在vim中使用autocmd命令在保存文件时自动插入最后修改日期和时间
- 使用Windows API操作配置(.ini)文件
- 如何使用web_reg_save_param方法保存的多个参数?
- 使用MSXML来保存配置信息的CPP类
- 如何使用web_reg_save_param方法保存的多个参数?
- 如何使用web_reg_save_param方法保存的多个参数?
- 回发或回调参数无效。在配置中使用
- 回发或回调参数无效。在配置中使用 ...
- 回发或回调参数无效。在配置中使用...pages enableEventValidation="true"/>
- 保存和配置系统硬件注册信息―注册表使用全攻略之十二
- 回发或回调参数无效。在配置中使用 或在页面中使用 启用了事件验证。
- 如何使用web_reg_save_param方法保存的多个参数?
- Castle ActiveRecord 使用动态填写参数方式配置数据库连接
- 如何使用web_reg_save_param方法保存的多个参数?
- 回发或回调参数无效。在配置中使用...pages enableEventValidation="true"/>