草庐IT

GetPrivateProfileSection

全部标签

windows - 具有重复键的 INI 文件

假设我有一个像这样的INI文件:[123]name=Ryanname=Joe如何使用API调用(例如GetPrivateProfileSection)检索“name=Ryan\nname=Joe”和GetPrivateProfileString? 最佳答案 是的,GetPrivateProfileSection会返回它。GetPrivateProfileString()显然只能检索“Ryan”。你不会像你想要的那样得到传递给你的字符串,名称/值对由零分隔。列表的末尾由两个零表示。您在解析它时需要考虑到这一点。