Link to home
Start Free TrialLog in
Avatar of jmnolan
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
Avatar of Iexpert
Iexpert

Of course it works?
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
>> 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 ;)
ASKER CERTIFIED SOLUTION
Avatar of TallBoy
TallBoy
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Argh - I edited too quickly.  The first line should read, "The function DOES have some differences when executed under NT, but..."
Avatar of jmnolan

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.