Is there a library or dll for handling ini files?
Posted on 2003-01-22 00:27:02 by jInuQ


Posted on 2003-01-22 00:30:02 by BubbaFate
Thanks for the pointer.
Posted on 2003-01-22 00:31:10 by jInuQ
Heghlu'meH QaQ jajvam :)
Posted on 2003-01-22 01:20:45 by SpooK
Lets see did I get it right?

I will die for these good days. :confused:

and how it this?

Heghlu'meh tlhab
Posted on 2003-01-22 01:54:45 by jInuQ
Much like using a dictionary to translate complex phrases, literal translations don't work :)

Heghlu'meH QaQ jajvam = "Today is a good day to die!"

Heghlu'meh (Heghlu'meH) thlab = "I will die for Liberty!" (roughly)
Posted on 2003-01-22 04:27:22 by SpooK
Yes I figured as much. I havn't used it in like 6 or 7 months. :grin:
Posted on 2003-01-22 15:29:03 by jInuQ
Maybe some of you disagree but personally I think they suck. I wrote a program using them for both reading and writing until I found out you need to specify the full path to the ini file else the api's won't find them. You can't even find out if a file exist or not so if you have a program in the current dir and a corresponding ini file you still need to write the full path for it else you just get the default values back when you read them.

// CyberHeg
Posted on 2003-01-23 07:53:16 by CyberHeg
So would you suggest something else?
Posted on 2003-01-23 11:20:04 by jInuQ
working with files w/o a full path is sloppy anyway, so who cares
Posted on 2003-01-23 15:16:17 by BubbaFate
Must have spent too long in a *nix enviroment. :grin:
Posted on 2003-01-23 17:44:07 by jInuQ
No, unfortunatly not. I choosed to do my own code instead.

// CyberHeg
Posted on 2003-01-24 06:30:21 by CyberHeg
working without a full path is fine as long as you know what you're doing
(ie, you *know* the thread (process?) current working directory wont change).
It's silly that ini files default to windows\system (or is it just windows) directory
when only a filename is given, but I guess that's win3.x behaviour.

Oh, and btw, I hope "working with files w/o a full path is sloppy anyway" isn't meant to be advertising using hardcoded paths :rolleyes:
Posted on 2003-01-24 06:34:58 by f0dder
Working without a path is dangerous because the current directory of your process is not guaranteed to be the directory that your exe is in, therefore it?s sloppy... and if I wanted to advertise the use of hard coded paths I would have said this... "working with files w/o a hard coded path is sloppy anyway" =/
Posted on 2003-01-24 23:14:58 by BubbaFate
Just going to do a GetCurrentDirectory and then I can add to it.
Posted on 2003-01-25 00:24:14 by jInuQ
Bubba is right: the current directory is not always the directory of the executable...
The proper way to go is to call GetModuleFileName(), search the '\' character and append the ini file name to this string... so, no problem...
Posted on 2003-01-25 04:31:45 by JCP
it definitely is more "proper" to work with full paths... and for anything larger than "utility" type stuff, it's probably "the proper way" to code. might end up saving you from a lot of frustration ;)
Posted on 2003-01-25 06:33:04 by f0dder
Okay, makes sense.
Posted on 2003-01-25 11:12:27 by jInuQ