首页 > 其他 > 详细

使用CString类型的变量读取ini配置文件中的数据后,使用ReleaseBuffer释放

时间:2015-04-03 16:54:37      阅读:80      评论:0      收藏:0      [点我收藏+]

如果未使用 ReleaseBuffer,会导致Find()函数查找失败!

 1 {
 2     GetPrivateProfileString("SZDeskConnections", strTemp.Right(1),NULL,strBuffer.GetBuffer(100),100,".\\RQTrans.INI");
 3     strBuffer.ReleaseBuffer();
 4 }
 5     int iPos[8] = {0}, nIndex(0);
 6     while (nIndex<7)
 7     {
 8        nIndex++;
 9        iPos[nIndex] = strBuffer.Find("|", iPos[nIndex-1]+1);
10      }

 

使用CString类型的变量读取ini配置文件中的数据后,使用ReleaseBuffer释放

原文:http://www.cnblogs.com/KuKayYou/p/4390348.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!