Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Delete section in INI File

Status
Not open for further replies.

ChewDoggie

Programmer
Mar 14, 2005
604
US
Hello All,

Is there a simple way to delete a section of an INI file ?

Thanks!

Chew


10% of your life is what happens to you. 90% of your life is how you deal with it.
 
OK, I should've Googled this (instead of 'Yahoo') before posting.

It turns out that when you call WritePrivateProfileString, pass to it the Section you want to delete and empty strings for the Key and Value params and the entire section will be deleted.

Good to know.

Chew


10% of your life is what happens to you. 90% of your life is how you deal with it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top