Autor Beitrag
fuba
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 125

Win7
D7 Ent.
BeitragVerfasst: Do 28.06.07 01:20 
Moin,

wie stelle ich es an, das der Prozess der auf eine Datei zugreift, NUR von dieser datei entfernt wird?
Das programm "Unlocker" kann das, nur wie machen die das?

Bsp.
Selle mir das so in etwa vor:
meine.dll -> löschen -> zugriff verweigert weil wird benuzt...

Programm das auf "meine.dll" zugreift = "explorer.exe"

ja schon klar, mit "Taskkill" kann ich den explorer kicken, dan auf datei zugreifen, dann explorer wieder starten.
Aber das gehat auch anders, nur wie?

und so sollte es sein:
meine.dll -> explorer.exe von DIESER dll freigeben -> meine.dll löschen

bzw

meine.dll -> ALLE prozesse die auf datei zugreifen von DIESER datei entfernen -> datei löschen

--

danke euch für eure vorschläge und co.
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: Do 28.06.07 08:31 
Das ganz wird über das globale auslesen der Handle-Tabelle von Windows gemacht. Erfordert ein wenig Kenntnisse über den Kernel-Mode von Windows, sowie ein wenig Erfahrung mit Prozessen ...

_________________
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.
Dezipaitor
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 220



BeitragVerfasst: Fr 29.06.07 09:08 
Man kann eine Datei auch Löschen lassen während das System neustartet. Dazu wird die Datei markiert und während des nächsten Starts gelöscht.
Weiß grad net, ob es mit DeleteFile oder SHFileOperation ging.
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 29.06.07 09:20 
Keine von beiden ... Die Funktion heißt MoveFileEx ...

_________________
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.
fuba Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 125

Win7
D7 Ent.
BeitragVerfasst: Mo 03.09.07 20:17 
jo stimmt, mit "MoveFileEx" würde es funten, wenn ich die datei löschen will.

Nur möchte ich das "instant" und das scheint mir irgendwie zu heftig zu sein, wenn ich mir folgenden satz ansehe:
ausblenden Quelltext
1:
Erfordert ein wenig Kenntnisse über den Kernel-Mode von Windows, sowie ein wenig Erfahrung mit Prozessen ...					


Da ich beide nicht wirkich besitze :P

Aber danke für eure antworten ;)