直接看代码吧;
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);
结果出来就是这样子: