Solved

*INI File

Posted on 2001-06-21
4
300 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

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

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

Suggested Solutions

This tutorial is about how to put some of your C++ program's functionality into a standard DLL, and how to make working with the EXE and the DLL simple and seamless.   We'll be using Microsoft Visual Studio 2008 and we will cut out the noise; that i…
What my article will show is if you ever had to do processing to a listbox without being able to just select all the items in it. My software Visual Studio 2008 crystal report v11 My issue was I wanted to add crystal report to a form and show…
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…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

820 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