[Lazarus] TFileStream
Hans-Peter Diettrich
DrDiettrich1 at aol.com
Mon Jan 26 16:59:09 CET 2009
Dave Coventry schrieb:
> FS:=TFileStream.Create(fname, fmshareDenyWrite);
IMO you should also specify the requested access (fmCreate or
fmOpen...), even if zero happens to mean fmOpenRead.
Nonetheless it looks strange when the same file cannot be reopened
later. Are you sure that fname is unchanged the second time?
Why don't you keep the stream open, and move the try/finally to the end
of the subroutine?
DoDi
More information about the Lazarus
mailing list