Deleting INI file entry

  • Thread starter Thread starter Adam Honek
  • Start date Start date
A

Adam Honek

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

How does one delete an trying within an INI file?

Thanks,
Adam
 
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.
 
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]
 
Back
Top