I'm coding in Delphi and using the Windows and SysUtils units:įFileStreamOne := TFileStream.Create( fFileName, fmOpenRead or fmShareDenyNone ) įFileStreamTwo := TFileStream. any ideas? (I can't change the code for the app that's writing to the log) However, the app that needs to write to the file errors out w 'Cannot open log file C:\XXX.log' - it's trying to open the same file in fmOpenReadWrite or fmShareCompat. Now when loading text from a stream, you’ll typically want to strip off the preamble. In my previous post, I described differences in saving text with TStringStream and TStringList. I have the file open in fmOpenRead or fmShareDenynone and have no issues with opening. Loading a Unicode string from a file with Delphi functions. My issue is that there is a process running that needs to write to the file which may be during the time I am reading. I have tried with FileStream, AssignFile and even CopyFile. I want to read the first 15 characters from a text file but I keep. I would like to scan a log file in read only mode w no locking. Im having trouble reading from a FileStream.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
December 2022
Categories |