Deleting INI file entry

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
 
H

Homer J Simpson

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.
 
T

Tom Shelton

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]
 
A

Adam Honek

Thanks all, I'll try it all out tonight and see how it unfolds in a code
sense.

Adam
 

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

Top