Autor Beitrag
lukkee
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 27



BeitragVerfasst: Mi 03.09.08 16:43 
Hallo, ich steh vor einem problem.. undzwar
Wie kann ich mittels WMI prüfen ob ein Prozess oder application beendet wurde?
Wie ich den Start abfange hab ich schon rausgefunden.. aber gibts auch eine Funktion beim beenden einer Application?.

mfg
lukkee Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 27



BeitragVerfasst: Mi 03.09.08 17:16 
ok ich habs hin bekommen mit

SELECT * FROM __InstanceDeletionEvent within 0.1 WHERE TargetInstance ISA "Win32_Process"'

Damit das thema nicht umsonst war.. hab ich noch ne frage..
Warum steigt bei WMI die CPU Auslastung so hoch an?

Ich hab die Prozessliste vorher mit einem "Timer" nach veränderungen geprüft.. mir kam es nach einer unsauberen Lösung vor. Deshalb hab ich das jetz mit WMI gemacht.


Wenn ich mir die CPU Auslastung so ansehe dann ist WMI eher ne unsaubere Lösung. mhh
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: So 07.09.08 14:45 
Wenn es um einen bestimmten Prozess geht, kannst Du auch WaitForSingleObject nehmen, IMHO ...

_________________
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.