关于C++系统配置 编程下列代码是什么意思啊,GetPrivateProfileSectionNames的功能又是什么呢

CStringList* CIniData::GetSectionList()
{
char ac_Result[2000];
m_pSectionList->RemoveAll();

long lRv = GetPrivateProfileSectionNames( ac_Result, 2000, (LPCTSTR)m_sFileName );

CString strSectionName;
for( int i = 0 ; i < lRv ; i ++ )
{
if(ac_Result[i] != '\0')
{
strSectionName = strSectionName + ac_Result[i];
}
else
{
if( strSectionName != "" )
{
m_pSectionList->InsertAfter( m_pSectionList->GetTailPosition(), strSectionName );
}
strSectionName = "";
}
}
return m_pSectionList;
}

这个函数是VC++中操作ini文件的一组函数中的一个。是从文件中读出所有节的名称,这一组函数是一起搭配使用的。在百度上可以搜到很多。http://blog.csdn.net/leixuejun/archive/2009/10/29/4741929.aspx。这个网页有比较详细的解释,还可以看看VC MSDN中间也有很多例子代码。
温馨提示:答案为网友推荐,仅供参考
第1个回答  2011-03-01
看看这篇文章对你是否有帮助:

相关了解……

你可能感兴趣的内容

本站内容来自于网友发表,不代表本站立场,仅表示其个人看法,不对其真实性、正确性、有效性作任何的担保
相关事宜请发邮件给我们
© 非常风气网