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 _______________________________________________ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus