Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / Managed C++ / March 2005

Tip: Looking for answers? Try searching our database.

Does VC.NET have an INI file class?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Fred Hebert - 25 Mar 2005 21:50 GMT
In order to maintain compatibility with some older software I need to be
able to read and write a classic ini type file.  I don't see anything like
that in VC.NET.  The old code looks something like this:

TIniFile *INI;
INI = new TIniFile("MyApp.ini");
Timeout = INI->ReadString("DEFAULTS","Timeout","10");
delete INI;

Before I go writing my own, I thought I'd ask.
Nemanja Trifunovic - 26 Mar 2005 00:54 GMT
You may want to look at this:

http://www.codeproject.com/cpp/CIni.asp

BTW, why do you create INI on the heap in your example?
Fred Hebert - 28 Mar 2005 17:06 GMT
> You may want to look at this:
>
> http://www.codeproject.com/cpp/CIni.asp
>
> BTW, why do you create INI on the heap in your example?

This is a fragment from some legacy code that I am attempting to convert to
.NET.  It is part of an example program that shows how to use a 3rd party
DLL, and is giving me fits.

I downloaded the CIni code/example but can't seem to get it to work
properly.  I think mostly it's MFC/.NET differences.

Code from example that works:
 m_sDelimiter = ini.GetString(_T("Settings"), _T("Delimiter"), _T(","));
 
My code:
 IpEdit->Text = ini.GetString(_T("DEFAULTS"),_T("IpAddress"),_T
("10.1.1.1"));
 
Compiler complains that CIni::GetString function does not take 3 arguments.  
Obviously a bogus error, but why?

I didn't think going to .NET was going to mean starting over with
programming 101, but it seems that everything I want do do, and used to be
easy, is just so difficult.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.