• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 323
  • Last Modified:

*INI File

Hi I wanna call a INI file to get some data to my progam.. I can use, GetPrivateProfileInt(..) function, but then I will open the INI file evry time I call the function, for performace resons I can't let that happen.. Can I make a pointer to the "ini_ile", that I can pass into my GetPrivateProfileInt(..) function instead of a file ??


Then I wont have to load the file for evry time I need some settings..

Whow is that done ?
0
win32
Asked:
win32
  • 2
1 Solution
 
jlsjlsCommented:
I think the normal use of an ini file is to read it once when you start your application. Then you open the ini file , retrieve all the settings from the ini-file into variables, close the ini file and start the other work of your application. So you don't have any performance problems.
0
 
jhullyCommented:
Some not very good but useful solution:
create mdb file (access) and work with it by ADO.
If the ini won't be big, it will be useful.
0
 
AlexVirochovskyCommented:
>>Then I wont have to load the file for evry time I need some settings..
For this I wrote class (TIni), that make this, but it is not 20 pts!

0
 
jhullyCommented:
How do you like next variant:
create .xml file and load it only once by DOM or somethink like this. But... this solution won't allow to you to use changed values of ini.
0

Featured Post

Take Control of Web Hosting For Your Clients

As a web developer or IT admin, successfully managing multiple client accounts can be challenging. In this webinar we will look at the tools provided by Media Temple and Plesk to make managing your clients’ hosting easier.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now