On Tue, Mar 21, 2017 at 10:39:23AM -0400, James Richters wrote:
> I am still having this issue.  I've managed to narrow down what is happening
> some.   The problem is my data is not actually being written all the way to
> disk.   I now have a repeatable proven method to reproduce the issue.  Here
> is the sequence.
> 
> In my freepascal console application, I create the file
> Assign file
> Rewrite file
> Writeln file 
> Writeln file
> Writeln file ...
> Flush file

Have you tried using the FlushFileBuffers() Windows API?  Something like
this:

FlushFileBuffers(TextRec(AFile).Handle);

Add "windows" to the uses clause, obviously.

Henry
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to