-
Hello
My inifile:
[XXXX]
Key=hello
Does anyone know how to effectivly delete the [XXXX] part
in a ini-file?
I know how to delete the "key=hello" part in an ini-file by using the "WritePrivateProfileSection" but that leaves the [XXXX] part in the ini-file. I want to get rid of that one too.
Thank you
-
By writing it yourself, not with the API!
Roger
-
How about this API Function:
Code:
Private Declare Function OSWritePrivateProfileString Lib "kernel32" Alias "WritePrivateProfileStringA" (ByVal lpApplicationName As String, ByVal lpKeyName As Any, ByVal lpString As Any, ByVal lpFileName As String) As Long
OSWritePrivateProfileString "XXXX", 0&, 0&, "C:\YOUR_INI_File.ini"
HTH
[Edited by QWERTY on 07-05-2000 at 02:56 PM]
-
thank you
Thank you Qwerty
It works perfect.
I also noticed that if I delet a heading with keyvalues in it, everything was deleted.
This is what I have been looking for.
Thanks again