Hallo,
ich denke das die Stringlist das Öffnen von Dateien exclusive macht und man daran auch nichts ändern kann
(ich wüßte zumindest nicht wie).
Alternativ kannst Du TFileStream verwenden, dort kannst Du die Modi übergeben wie die Datei geöffnet werden soll.
[edit]
Oder versuche einmal die Variable FileMode entsprechend zu setzen.
Die Variable ist in der system.pas global definiert.
[/edit]
FileMode := fmOpenRead;
Zitat von
DelphiHilfe:
Category
file management routines
const
fmOpenRead = $0000;
fmOpenWrite = $0001;
fmOpenReadWrite = $0002;
fmShareCompat = $0000;
fmShareExclusive = $0010;
fmShareDenyWrite = $0020;
fmShareDenyRead = $0030;
fmShareDenyNone = $0040;
Description
The file open mode constants are used when a file or stream is opened to control how it can be shared.
The TFileStream constructor has a Mode parameter that you can set to one of these constants:
Constant Definition
fmCreate If the file exists, open for write
access, otherwise, create a new file. Unlike the other constants, which are declared in the SysUtils
unit, this constant is declared in classes.pas.
fmOpenRead Open for read
access only.
fmOpenWrite Open for write
access only.
fmOpenReadWrite Open for read and write
access.
fmShareCompat Compatible with the way FCBs are opened.
fmShareExclusive Read and write
access is denied.
fmShareDenyWrite Write
access is denied.
fmShareDenyRead Read
access is denied.
fmShareDenyNone Allows full
access for others.
Grüße
Klaus