jmnolan
asked on
GetPrivateProfileString
Hi-
I'm using MS VC++ 6.0. I need to get some information out of an .ini file and someone told me that GetPrivateProfileString no longer works in 6.0. I have looked into it and this seems to be the case. How do I read information from an .ini file using VC++ 6.0?
Thanks
I'm using MS VC++ 6.0. I need to get some information out of an .ini file and someone told me that GetPrivateProfileString no longer works in 6.0. I have looked into it and this seems to be the case. How do I read information from an .ini file using VC++ 6.0?
Thanks
>> I have looked into it and this seems ...
The use of ini files is not recommended by MS, butits still partof the Win32 API. Should work and don't let yourself be mislead by MS ;)
The use of ini files is not recommended by MS, butits still partof the Win32 API. Should work and don't let yourself be mislead by MS ;)
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Argh - I edited too quickly. The first line should read, "The function DOES have some differences when executed under NT, but..."
ASKER
Thanks. The sample code worked for me. I was trying to use the CString Class instead of char[]. Caused some problems until I saw this solution.
Thanks to everyone who contributed.
Thanks to everyone who contributed.
It has nothing to do with VC6? It's part of the windows
API.
just #include <windows.h>
and use GetPrivateProfileString as required.
The paramseters you need to use are in help