Archived

This topic is now archived and is closed to further replies.

cozman

ini file read/write

Recommended Posts

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?

Share this post


Link to post
Share on other sites
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]

Share this post


Link to post
Share on other sites
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]

Share this post


Link to post
Share on other sites
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...

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.



Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites