Information générale
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
>Hi all,
>
>I should know this solution, but I can not seem to solve it.
>
>In a my code I have a point where a file is read in a variable (FileToStr). The string is modified and then written back to the file (StrToFile). This is done multiple time, very quickly. The problem is that file content that is read is not the file previous written, but the one prior to the writing. It appears that it is reading from the file, but writing to a staging buffer before actually writing to the disk. Therefore the reading does not see the recent changes.
>
>Does anyone have any suggestions? Perhaps flush the buffer?
>Or I should use low-level file functions? Or would that add a performance hit?
Just a stab in the dark - have you tried putting a DOEVENTS just after writing the to see if that makes a difference?
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement