Delete a section from within an INI file
What was that API if you wanted to delete a section from within an INI file? My memory completely fails me. I've looked around with Dependency Walker in kernel32 for DeleteSection or DeleteValue or something but I dont get any entry of that kind.
The MSDN Library has all the information on WriteProfileString you could ever want.
>I can see you are not that happy. <
May I put in a plug to avoid the windows built-in INI file reading and writing code like the plague?
Flamebait Sr., I do remember having read so and going in for the File I/O instead to read the INI and write to it but I have quite forgotten why.
Well, to put it bluntly, because the INI file code sucks and is an antiquated leftover from at least Windows 3.0, perhaps even earlier.
Then I got you wrong. So what you're saying is that there's not so much ugliness in the API interface than there is in the INI files itself? I am using a combination of INI, Registry, XML files and my own file parsing too for persistence. I've been using the Registry for long but only days ago I realized that some users on the network did not have rights to edit thier Registry. In fact while the application ran successfully in three offices, in one of the offices it ran on neither of the machines because none of the users had adequate rights. Since we are in a free market economy where the consumer is the king, I am now considering a change of option for the entire application (and its ancillary components, five of them) that eliminates the interface to the Registry altogether instead of asking the client to request a change in the network user rights for that office. Quite painful.
Fog Creek Home