bool CDevMQTT_Request::ReadIni()
{
TCHAR szFile[MAX_PATH] = { 0 };
CHelper::GetDllPath(szFile, MAX_PATH);
CString strfilename(szFile);
strfilename = strfilename + "DRIVER\\MQTT_Request.ini";
if (!CHelper::KvPathFileExists(strfilename))
{
CDebug::ShowDetailMessage(_T("UpdateConfigure : No configure file!"));
return false;
}
m_bUTF8Flag = GetPrivateProfileInt(strStn, "isUTF8", 0, strfilename.GetString());
cstrTemp.ReleaseBuffer();
return true;
}
在initialdevice里调用
该函数ReadIni()获取DLL路径,附加MQTT_Request.ini文件名,检查文件是否存在。如果存在,它会读取配置文件中的isUTF8项,设置m_bUTF8Flag变量。若文件不存在,显示错误消息并返回false。最后,释放cstrTemp缓冲区。
9908

被折叠的 条评论
为什么被折叠?



