Sample code for GetPrivateProfileString()

I am trying to read data from an ini file. I have read the MSDN website regarding this function, but I don't have the slightest idea on how to implement it.

Can anyone post a sample code on reading an ini file? Thanks.
closed account (S6k9GNh0)
There is a small open source project called IniReader somewhere on the internet. Go find it and it shows you a very secure way to do this.
http://msdn.microsoft.com/en-us/library/ms725501(VS.85).aspx

Wow that's some lengthy code! I only have 3 keys to read from my ini file. Do I really need that?
Not really.

Take what you want from the example. Once you get used to the WIN32 API, the parameters will become obvious.
closed account (S6k9GNh0)
http://www.codeproject.com/KB/cpp/IniReader.aspx

That's what I was talking about..
Topic archived. No new replies allowed.