|
-
Jul 5th, 2000, 09:02 AM
#1
Thread Starter
Hyperactive Member
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
Onerrorgoto
Dont be to optimistic, the light at the end of the tunnel might be a train
-
Jul 5th, 2000, 12:30 PM
#2
Lively Member
By writing it yourself, not with the API!
Roger
-
Jul 5th, 2000, 01:11 PM
#3
Fanatic Member
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]
-
Jul 6th, 2000, 01:46 AM
#4
Thread Starter
Hyperactive Member
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
Onerrorgoto
Dont be to optimistic, the light at the end of the tunnel might be a train
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|