Autor Beitrag
LonghornUser
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 796



BeitragVerfasst: Do 22.06.06 22:29 
Hallo,

ich versuche, zu testen, ob der User eine Berechtigung hat, eine Datei zu ändern. Geht das mit Delphi ?

Danke schonmal.

Ciao LHUser
Luckie
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Do 22.06.06 23:19 
Les den SecurityDescriptor aus: Suche im MSDN GETSECURITYDESCRIPTORDACL.
LonghornUser Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 796



BeitragVerfasst: Do 22.06.06 23:32 
Danke erstmal.
Uff, damit kann ich so noch nix anfangen. Ich versteh net ganz, was ich da für die parameter einsetzen soll.
Und wo setze ich da den Pfad zur betreffenden Datei ein ? ALso bei GetSecurityDescriptorDacl().
Luckie
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Fr 23.06.06 00:31 
Da musst du dich eben mal etwas im MSDN umsehen. Dann w#rst du zum Beipiel auf das gestossen: msdn.microsoft.com/l...ic_access_rights.asp Ruf zum Beispiel Suche im MSDN CREATEFILE mit GENERIC_READ auf und wenn das klappt, hat der Benutzer Schreibrechte.
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: Fr 23.06.06 10:39 
@user profile iconLuckie: Du hättest aber auch einfach auf deine HP verweisen können:

luckie-online.de/Dev...CheckFileAccess.html

_________________
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.
Luckie
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Fr 23.06.06 11:37 
user profile iconBenBE hat folgendes geschrieben:
@user profile iconLuckie: Du hättest aber auch einfach auf deine HP verweisen können:

luckie-online.de/Dev...CheckFileAccess.html


Ups. Da habe ich gar nicht mehr dran gedacht. ;)
LonghornUser Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 796



BeitragVerfasst: Fr 23.06.06 11:43 
Juhu. Es klappt ohne Probleme. Danke !!