得到INI文件所有Section(所有节点名称)

char SectionNames[MAX_PATH],*pSectionName;
ZeroMemory(SectionNames,MAX_PATH);
GetPrivateProfileSectionNames(SectionNames,MAX_PATH,"config.ini");
int i=0;
for (char* Name = SectionNames;*Name !='';Name+=strlen(Name)+1,i++)
{
m_List.InsertItem(i,Name);
}

原文地址:https://www.cnblogs.com/dengpeng1004/p/4689563.html