您的位置:首页 > 其它

使用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);

结果出来就是这样子:

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐