Rya*_*wis 1 windows vb6 winapi visual-studio
假设我有一个像这样的INI文件:
[123]
name=Ryan
name=Joe
Run Code Online (Sandbox Code Playgroud)
如何使用API调用(如GetPrivateProfileSection和GetPrivateProfileString)检索"name = Ryan \nname = Joe" ?
是的,GetPrivateProfileSection将返回它.GetPrivateProfileString()显然只能检索"Ryan".你不会得到你想要的字符串,名称/值对用零分隔.列表的末尾用两个零表示.解析它时,您需要考虑到这一点.