Click to See Complete Forum and Search --> : Deleting .ini keys
September 25th, 1999, 07:27 PM
Is there a way to delete all the Keys under a certain Section in an .ini file? i.e.
[MySection]
Key1=test1
Key2=test2
Key3=test3
I want to delete everything under [MySection]. There are many texts on reading and writing to .ini files but I cant seem to find anything on deleting keys.
Much Thanks in advance,
Ele
Ravi Kiran
September 26th, 1999, 09:05 PM
Look at WritePrivateProfileSection. Since it allows you to write one section in one go, may be you can delete a few keys and write the whole section back.
If you want just the value to be cleared, then just write a vbNullString to it.
RK
Nizamuddin
December 19th, 2000, 04:40 AM
Ravi have a look at this and I see if u can help me.
Hi,
I am from Interactive Logicware Ltd. A Hyderabad Based Company which into the development of decision-making systems. We are developing a unique product called OPMS (One Page Management System) . The system deals with solving complex problems of any nature using Interactive Management techniques.
In one of our modules we have information to be stored in INI files which is working fine on NT system and same modules is unable to store information on a 95/98 system after the file size reaches 63.9 kb. The information is stored programmatically. If we are trying to store the same information-using cut and paste it is storing till any size irrespective of the operation system.
This particular problem has halted our work quite few days now. If you can help us in some manner I will be grateful to you.
Particulars of the Operating system
Win 95 WinNT
64mb Ram 128 Ram
4.3 Gb H.D 20 Gb H.D
Pentium II 450 Mhz Pentium III 733 Mhz
The programing language we are using is VC++ 6.0 Enterprise Edition.
Md. Nizamuddin
System Analysts
Interactive Logicware Ltd.
Email: nizam_ko@yahoo.com
Nizam
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.