[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

*INI File

Posted on 2001-06-21
4
Medium Priority
?
318 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 3

Accepted Solution

by:
jlsjls earned 80 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This article shows how to make a Windows 7 gadget that accepts files dropped from the Windows Explorer.  It also illustrates how to give your gadget a non-rectangular shape and how to add some nifty visual effects to text displayed in a your gadget.…
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…
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…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…

656 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