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]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top