AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Zurück Delphi-PRAXiS Sprachen und Entwicklungsumgebungen Sonstige Fragen zu Delphi Delphi Zugriffsproblem bei Dateien (Lesezugriff)
Thema durchsuchen
Ansicht
Themen-Optionen

Zugriffsproblem bei Dateien (Lesezugriff)

Ein Thema von DoktorD · begonnen am 7. Sep 2007 · letzter Beitrag vom 7. Sep 2007
Antwort Antwort
Klaus01

Registriert seit: 30. Nov 2005
Ort: München
5.782 Beiträge
 
Delphi 10.4 Sydney
 
#1

Re: Zugriffsproblem bei Dateien (Lesezugriff)

  Alt 7. Sep 2007, 10:41
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
Klaus
  Mit Zitat antworten Zitat
Antwort Antwort


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 20:18 Uhr.
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz