473,396 Members | 1,766 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Does VC.NET have an INI file class?

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.
Nov 17 '05 #1
2 1337
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?

Nov 17 '05 #2
"Nemanja Trifunovic" <nt*********@hotmail.com> wrote in
news:11**********************@l41g2000cwc.googlegr oups.com:
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.
Nov 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
by: Fred Pacquier | last post by:
First off, sorry for this message-in-a-bottle-like post... I haven't been able to phrase my questions well enough to get a meaningful answer from Google in my research. OTOH, it is standard...
0
by: Bill Davy | last post by:
I am working with MSVC6 on Windows XP. I have created an MSVC project called SHIP I have a file SHIP.i with "%module SHIP" as the first line (file is below). I run SHIP.i through SWIG 1.3.24...
2
by: Joe Fallon | last post by:
I have a Shared class with a New constructor that initializes some Shared properties. One of the steps involves a hit to the database. My tests show that when called by a WinForms app, the...
3
by: Richard Lewis Haggard | last post by:
We are having a lot of trouble with problems relating to failures relating to 'The located assembly's manifest definition with name 'xxx' does not match the assembly reference" but none of us here...
3
by: Mike Owen | last post by:
Hi, I have set up a new web site application in VS 2005, and have created a couple of pages which seem to run ok. I then manually added a file called Global.asax.vb, within a folder that I...
6
by: sandy | last post by:
I am creating a class (or so I hope) which is to be a JobCollection, linked list of 'Job'. Job is another class already created. JobCollection is just the linked list manager. I have to have...
7
by: The Cool Giraffe | last post by:
Please note that i do intend to use a header file. However, i'm not sure if it's really needed or just a convention. Suppose we have the following two files. // Something.h class Something {...
1
by: Ronald S. Cook | last post by:
I was able to do my first Windows Communication Foundation test project and all worked well. But now I want to add a second class to my service. There is that Service.svc file that has only...
7
by: =?Utf-8?B?UGV0ZXI=?= | last post by:
Dim sCoName As String = oDs.Customers(0).CompanyName The part that I want to understand is the oDs.Customers(0). Does oDs.Customers(0) mean 1st row of the datatable Customers. Where can I find...
15
by: Barry Flynn | last post by:
VB 2005. I have the following code in a Sub. Dim oFred As SillyClass oFred = New SillyClass oFred.Gloop() oFred = Nothing Exit Sub
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.