![]() |
#2
rjsp2012-04-21 15:22
|
今天用GetPrivateProfileSectionNames获取ini文件中所有section名称时,一直返回0,而且数组中也没有东西,这是如何?
char *path = "D:\\abc.ini";
DWORD secLen = 100;
char section[100];
//读取所有section
int ret = GetPrivateProfileSectionNames((LPWSTR)section,secLen,(LPCWSTR)path);
cout<<ret<<endl;
system("pause");
return 0;
代码是上面那样。