ini file read/write

Started by
6 comments, last by cozman 21 years, 10 months ago
does anybody know a (platform independant) way to read and write .ini files? Are there free classes out there to do this? Or are there tutorials on the subject?
Advertisement
Go to MSDN and look up functions like:

GetPrivateProfileInt()
WritePrivateProfileInt()
...

near the bottom there will be a "See Also", click Registry Functions then go down till you see other functions with similar names and you can read about them all.

EDIT: Went and checked and they are not under "Obsolete Functions" on the web based MSDN as they are in the VC++ MSDN


I will not make a list of links... I will not make a list of links... I will not make a list of links...
Invader's Realm

[edited by - Invader X on June 10, 2002 2:01:16 AM]
quote:Original post by cozman
does anybody know a (platform independant) way to read and write .ini files? Are there free classes out there to do this? Or are there tutorials on the subject?


What's so difficult about reading/writing string's from/to a file ?

[edited by - George2 on June 10, 2002 3:43:10 PM]
"THE INFORMATION CONTAINED IN THIS REPORT IS CLASSIFIED; DO NOT GO TO FOX NEWS TO READ OR OBTAIN A COPY." , the pentagon
quote:Original post by Invader X
Go to MSDN and look up functions like:

GetPrivateProfileInt()
WritePrivateProfileInt()
...

near the bottom there will be a "See Also", click Registry Functions then go down till you see other functions with similar names and you can read about them all.

EDIT: Went and checked and they are not under "Obsolete Functions" on the web based MSDN as they are in the VC++ MSDN


I will not make a list of links... I will not make a list of links... I will not make a list of links...
Invader''s Realm

[edited by - Invader X on June 10, 2002 2:01:16 AM]


Hmm... those are very cross-platform... lets see:
Windows 3.1, Windows NT, Windows 95, Windows 98,
Windows ME, Windows 2000 and Windows XP...
Joakim Asplundhttp://megajocke.y2.org
Step 1)Parse File
Step 2)Build Hash Tables
Step 3)Profit
I''ve found an alternative method do doing this, thanks for the replies though.


Invader X: Thanks, but as megajocke pointed out I asked for cross platform (as in Linux/MacOS/Windows) ways. I know the WinAPI way.

George2: Ini files have a specific format with section labels, string and integer variables, and comments. It''s not as simple as you put it.
quote:Original post by cozman
George2: Ini files have a specific format with section labels, string and integer variables, and comments. It''s not as simple as you put it.


On the contrary, INI''s are actually quite easy to work with.



quote:Original post by megajocke
Hmm... those are very cross-platform... lets see:
Windows 3.1, Windows NT, Windows 95, Windows 98,
Windows ME, Windows 2000 and Windows XP...


Err.... oops... missed that platform independant part.


I will not make a list of links... I will not make a list of links... I will not make a list of links...
Invader''s Realm

This topic is closed to new replies.

Advertisement