Good question. Have wondered what might happen if something else changes the ini file while my app is working with it, whether file is read in and locked by Delphi etc...
 
From the Delphi 7 help file
A FileName is passed to the TIniFile constructor and identifies the INI file that the object accesses.
 
On Windows, a related object, TMemIniFile, works the same way as TIniFile, but buffers writes in memory to minimize disk access.
On Linux, TIniFile is the same as TMemIniFile.
From which I guess that TMemIniFile does Writes (and Reads?) from memory in contrast to TIniFile that does it (all?) from disk?
 
Had a look in the development guide (D4) but no info there.
 
Found next on Google search Delphi news Groups, which if right suggests that the file is not read in at TiniFile creation time:
 
From: Ndi (Ndi_at_Ndi_dot_ro)
Subject: Re: Try / Finally and TIniFile
Newsgroups: borland.public.delphi.language.objectpascal
Date: 2003-10-29 19:39:23 PST
TINIFile.Create will never except as all it does is store the file name
for further reference. Reading from file that is invalid will.

--
Andrei "Ndi" Dobrin
Brainbench MVP
www.Brainbench.com
================
 
Paul
 
Ph NZ 021 782 433
Fx NZ 021 292 2433
 
Overseas:
 
Ph. +6421782433
Fax +64212912433
 
P.O. Box 1005
Nelson 7015
New Zealand
_______________________________________________
Delphi mailing list
[EMAIL PROTECTED]
http://ns3.123.co.nz/mailman/listinfo/delphi

Reply via email to