Brian Dumas
asked on
using GetPrivateProfileSectionNames for UNICODE
Using VS2008.
My code is attached. It always returns slength==0. And no strings in the szResult. Can anyone show me how to get this working ina UNICODE environment?
My code is attached. It always returns slength==0. And no strings in the szResult. Can anyone show me how to get this working ina UNICODE environment?
char* szResult = new char[2000];
memset(szResult, 0x00, 2000);
int slength=GetPrivateProfileSectionNames((LPWSTR)szResult, 2000, (LPWSTR)m_szFileName);
What does GetLastError function returns? call this function just after GetPrivateProfileSectionNa mes call and let us know the error code
ASKER
GetLastError returns "The operation completed successfully."
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
http://www.codeproject.com/KB/cpp/UNICOD_inifile.aspx
Check this. This page has the class with appropriate members to read the data. If it works we can do the parsing in the next step.
Check this. This page has the class with appropriate members to read the data. If it works we can do the parsing in the next step.
ASKER
Thanks for the quick and accurate help
ASKER
Thanks, Brian