473,387 Members | 1,364 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,387 software developers and data experts.

Deleting INI file entry

I'm using GetPrivateProfileString and WritePrivateProfileString for IO to an
INI file.

How does one delete an trying within an INI file?

Thanks,
Adam
Apr 13 '06 #1
5 6341

"Adam Honek" <Ad*******@Webmaster2001.freeserve.co.uk> wrote in message
news:%2***************@TK2MSFTNGP02.phx.gbl...
I'm using GetPrivateProfileString and WritePrivateProfileString for IO to
an INI file.

How does one delete any thing within an INI file?


Not sure you can. Just set it to "" or ignore it.

You can overwrite the settings.

Apr 13 '06 #2
http://www.codeguru.com/forum/archiv.../t-189920.html
--
Get a powerful web, database, application, and email hosting with KJM
Solutions
http://www.kjmsolutions.com

"Adam Honek" <Ad*******@Webmaster2001.freeserve.co.uk> wrote in message
news:%2***************@TK2MSFTNGP02.phx.gbl...
I'm using GetPrivateProfileString and WritePrivateProfileString for IO to
an INI file.

How does one delete an trying within an INI file?

Thanks,
Adam

Apr 13 '06 #3
Adam...

If you want to delete a single key from an ini file you use
WritePrivateProfileString like this:

WritePrivateProfileString ("section name", "key name", Nothing, "file
name")

If you want to delete a whole section:

WritePrivateProfileString ("section name", Nothing, Nothing, "file
name")

HTH,
Tom Shelton [MVP]

Apr 13 '06 #4
Here's an INI module that I have always used. The creator explains what the
code does too:

http://www.gotdotnet.com/Community/U...3-5F958B73BDDD

Happy to help
Apr 13 '06 #5
Thanks all, I'll try it all out tonight and see how it unfolds in a code
sense.

Adam

"Jonny" <jo***@beagood.sod> wrote in message
news:eG*************@TK2MSFTNGP02.phx.gbl...
Here's an INI module that I have always used. The creator explains what
the
code does too:

http://www.gotdotnet.com/Community/U...3-5F958B73BDDD

Happy to help

Apr 16 '06 #6

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

Similar topics

0
by: Bandit | last post by:
I'm populating a gridview (called docList) with document info from a network folder like so: Sub Show_Files(ByVal inputDir As String) Dim strFileNamePath As String = inputDir Dim dirInfo As...
5
by: John Veldthuis | last post by:
My code works perfectly 100% when adding items to my ArrayList and updating the listbox. Works perfectly when deleting an item in the ArrayList when it is not the last entry but if it is the last...
1
by: arv6004u | last post by:
Hi, I have created Map Data stacture. Each map Entry contains hostname and it's value. I have traversed the map using iterator then i want to delete specific hostname entry and to change the...
6
by: FrankB | last post by:
Hello, after setting another image to the picture box it is not possible to delete the last shown file via File.Delete ( sFilename). Path of image file is correct. Error message box says: file...
5
by: mattkorguk | last post by:
Hi, Following the introduction of an appointment booking system in Access I've now given myself another issue. As I'm sending lots of appointments out I'm also then getting lots of the same...
1
by: diyasher | last post by:
hello my code is in c#. i am using fileSystemWatcher class to watch event when file is deleted. event is fire when file is deleted, i want to stop deleting file, means when user want to delete...
1
by: radhikabista | last post by:
my windows application form is divided into 3 split containers or split panels now what is my problem is i need to print the contents of the middle one container even if it is not seen full. but i...
2
Nepomuk
by: Nepomuk | last post by:
Recently, I found that I had associated a file type to notepad by mistake. This file type (let's just say, it has the extension .xyz) wasn't supposed to be opened by notepad - actually, it wasn't...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.