Solved

*INI File

Posted on 2001-06-21
4
294 Views
Last Modified: 2013-12-03
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
Comment
Question by:win32
  • 2
4 Comments
 
LVL 3

Accepted Solution

by:
jlsjls earned 20 total points
ID: 6214854
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
 

Expert Comment

by:jhully
ID: 6230714
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
 
LVL 14

Expert Comment

by:AlexVirochovsky
ID: 6248995
>>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
 

Expert Comment

by:jhully
ID: 6265371
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Event ID 10010 3 50
Enable Clear Text in Win 8.1 7 41
Poor Man's .NET Framework Certification 2 47
Is IHttpActionResult a promise pattern? 2 56
This article shows how to make a Windows 7 gadget that extends its U/I with a flyout panel -- a window that pops out next to the gadget.  The example gadget shows several additional techniques:  How to automatically resize a gadget or flyout panel t…
For a while now I'v been searching for a circular progress control, much like the one you get when first starting your Silverlight application. I found a couple that were written in WPF and there were a few written in Silverlight, but all appeared o…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
A company’s greatest vulnerability is their email. CEO fraud, ransomware and spear phishing attacks are the no1 threat to a company’s security. Cybercrime is responsible for the largest loss of money to companies today with losses projected to r…

914 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now