Re: Some users can't write to ini file.

From: Anders Isaksson (anders.isaksson_at_REMOVEcej.se)
Date: 01/19/04


Date: Mon, 19 Jan 2004 09:03:32 +0100

On Thu, 15 Jan 2004 13:34:57 -0800, "Perry Way"
<no.delphipro.spam@no.spam.earthlink.net> wrote:

>> >I didn't know Windows 9x buffered ini files.
>>
>> Cached or buffered? Windows has always cached the file.
>
>Really? That's not what someone's lead to believe by reviewing the SDK help
>file.

Well, in my experience Win 9x does cache *all* .ini files. Just try
modifying any .ini in Notepad, save the file and *immediately* start an
application that reads the .ini through the API. You may well get the
old values read by the app.

Also, try changing the .ini by running the app., close the app., open
the .ini in Notepad - you may well see the .ini as it was before the
app. ran.

Total mayhem can be guaranteed by letting an app access the .ini both
through the API, and through standard file operations, at the same time
:-)

Counting to three, and waiting for the blink on the disk activity LED
usually works around the 'problem' with external text editing of .ini
files.

-- 
Anders Isaksson, Sweden
BlockCAD: http://user.tninet.se/~hbh828t/proglego.htm
Gallery: http://user.tninet.se/~hbh828t/gallery/index.htm


Relevant Pages

  • Re: cant write to text file in Windows 7
    ... I am a VB programmer testing out my apps in Windows 7. ... and have not really used Vista or 7. ... I am trying to update a text file actually an INI file. ... my app via my original setup.exe which creates a folder in C:\. ...
    (microsoft.public.vb.general.discussion)
  • Re: Vista makes me crazy, please help.
    ... It's hardly complex to have the filename or the section name contain the user ID if that's necessary or to place the INI under the user's app data folders. ... The overhead of the registry index structure cuts into that but even if it still saves space it is a small advantage that is utterly swamped by the advantages of the individual files. ... There is some buffering on INI files as well and unless you are doing a LOT of reading and writing settings the speed just is not an issue. ...
    (microsoft.public.vb.general.discussion)
  • Read/Write INI on Program File Vista Problem
    ... I have a VB6 program that reads application settings from INI file... ... changing application settings through the VB app impossible. ...
    (microsoft.public.vb.general.discussion)
  • Re: ini Files vs Registry
    ... I like INI. ... XML seems ridiculous and if I need to deal with a lot of data it usually ... app already uses it for something else so the overhead is already accounted ...
    (microsoft.public.vb.general.discussion)
  • Re: Reg/INI Discussion from much earlier
    ... (File I/O and System Pooled Memory) so it is hard to see ... > I suspect that they are very inefficient, and prefer to use my own INI ... The API calls do have an advantage when it comes to writes, ... > I should really do a similar test with FileMon ...
    (microsoft.public.vb.general.discussion)