Autor Beitrag
dummzeuch
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 593
Erhaltene Danke: 5


Delphi 5 ent, Delphi 6 bis Delphi XE8 pro
BeitragVerfasst: Do 18.10.07 12:31 
Hi,

ich will feststellen, ob ich eine bestimmte Datei zum Schreiben oeffnen darf.

Am einfachsten waere es, einfach CreateFile mit den entsprechenden Flags aufuzurufen und anhand des Rueckgabewertes zu ueberpruefen ob es funktioniert hat. Aber das hat den Haken, dass dabei die Datei wirklich geoeffnet wird, also auch das Last Write Date geaendert wird. Ausserdem steht dann im System-Audit, dass ein Programm versucht hat die Datei zu schreiben.

Geht es auch irgendwie ohne diese Nebeneffekte?

twm


Moderiert von user profile iconjasocul: Topic aus Windows API verschoben am Do 18.10.2007 um 13:33
BenBE
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 8721
Erhaltene Danke: 191

Win95, Win98SE, Win2K, WinXP
D1S, D3S, D4S, D5E, D6E, D7E, D9PE, D10E, D12P, DXEP, L0.9\FPC2.0
BeitragVerfasst: Mo 22.10.07 08:47 

_________________
Anyone who is capable of being elected president should on no account be allowed to do the job.
Ich code EdgeMonkey - In dubio pro Setting.