VC++ 操作 ini 文件
}
UINT CIniFile::GetMaxSize_All_SectionNames()
{
return nMaxSize_All_SectionNames;
}
UINT CIniFile::GetMaxSize_A_Section()
{
return nMaxSize_A_Section;
}
DWORD CIniFile::IniFile_GetKeyNames(CString strSectionName, CStringArray &strArray)
{
char *sz = new char[nMaxSize_A_Section];
DWORD dw = IniFile_GetSection(strSectionName,sz,nMaxSize_A_Section);
char * index = sz;
CString strName,strValue;
int nPosition = -1;
while (index && (index < sz + dw))
{
CString str(index);
if (str.GetLength() < 1)
{
delete []sz;
return dw;
}
if ((nPosition = str.Find(_T('='))) == -1)
{
IniFile_DeleteString(strSectionName,str);
// continue;
}
else
{
strName = str.Left(nPosition);
}
strArray.Add(strName);
index = index + str.GetLength() + 1;
}
delete []sz;
return dw;
}
CString CIniFile::GetClassVersion()
{
return L"1.0.0.1";
}
Tags:VC,++,操作,ini,文件

