Autor Beitrag
scrooge
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 200



BeitragVerfasst: Di 11.05.04 17:09 
Tag,

frag mich jetzt seit längerem, wie der TaskManager Prozessgruppe beenden realisiert.
Gibts da ne Api zu ??

Schon mal danke für Posts.

Edit: Nur für den Fall, dass jemand sagen sollte, das Thema würde nicht in diese Sparte gehören: Ich bin mehr an dem eigentlichen Hintergrundinformationen interessiert, als an der Realisierung in einem Prog..
NetFalcon
ontopic starontopic starontopic starhalf ontopic starofftopic starofftopic starofftopic starofftopic star
Beiträge: 59

Guitar Player

BeitragVerfasst: Di 11.05.04 20:02 
Windows hat 2 bzw 3 Arten Programme über API zu beenden.
Das normale Close (Soltle das Programm noch eine Bestätigung brauchen zb durch den User wird diese Abgewartet)
Das Close ohne auf irgendwelche Bestätigungen zu warten
und Kill - also Ausradierung aus dem Speicher...

Alle sind über API egal in welcher Sprache realisierbar
mirage228
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 338

Win 7 Prof.
Delphi 2005 Prof., Delphi 2010 Prof.
BeitragVerfasst: Di 11.05.04 20:51 
scrooge hat folgendes geschrieben:
Tag,

frag mich jetzt seit längerem, wie der TaskManager Prozessgruppe beenden realisiert.
Gibts da ne Api zu ??

Schon mal danke für Posts.

Edit: Nur für den Fall, dass jemand sagen sollte, das Thema würde nicht in diese Sparte gehören: Ich bin mehr an dem eigentlichen Hintergrundinformationen interessiert, als an der Realisierung in einem Prog..


Also ich glaube Windows merkt irgendwie alle über CreateProcess o.Ä. von einem Prozess gestartete Prozesse und beendet diese ebenfalls.

mfG
mirage228

_________________
May the source be with you, stranger.
Motzi
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 2931

XP Prof, Vista Business
D6, D2k5-D2k7 je Prof
BeitragVerfasst: Di 11.05.04 21:34 
Im Prinzip ganz einfach.. jedes Programm hat einen Parent-Prozess der den jeweiligen Prozess gestartet hat.. nun muss man nur jene Prozesse suchen deren Parent-Prozess dieselbe ProcessID hat wie der Prozess dessen Prozess-Struktur man beenden will...

_________________
gringo pussy cats - eef i see you i will pull your tail out by eets roots!
scrooge Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 200



BeitragVerfasst: Mi 12.05.04 19:34 
Und wie findet man diese Parent-Prozesse raus ??
Motzi
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 2931

XP Prof, Vista Business
D6, D2k5-D2k7 je Prof
BeitragVerfasst: Mi 12.05.04 22:20 
Über die entsprechenden API-Funktionen.. willst du die auch wissen..? Geht es dir nur um die Theorie oder doch auch im Implementierung..?

_________________
gringo pussy cats - eef i see you i will pull your tail out by eets roots!
scrooge Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 200



BeitragVerfasst: Do 13.05.04 15:10 
Was heißt hier nur Theorie. Mit der Information der ensprechenden Api, ist theoretisch. Aber ja ich will dann gerne (hätte ja auch sein könne, dass man irgendwoher einen Info-Block einesProzesses bekommt, wodrin unter anderem auch der Parent-Prozess enthalten ist) auch ne konkrete Möglichkeit wissen, wie man da drankommt. Fallls das jetzt schon zu Win-Api-Sparte gehört, bitte ich die Mods einfach mal zu verschieben.
Motzi
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 2931

XP Prof, Vista Business
D6, D2k5-D2k7 je Prof
BeitragVerfasst: Do 13.05.04 15:49 
War ja nur eine Frage..! ;)

Prinzipiell gibt es mehrere Möglichkeiten an diese Information zu kommen.. mit den ToolHelp-APIs (CreateToolhelp32Snapshot und Verwandte), WMI (Win32_Process Class), PDH (Performance Data Helper), native APIs..

Edit: kleinen Fehler korrigiert

_________________
gringo pussy cats - eef i see you i will pull your tail out by eets roots!


Zuletzt bearbeitet von Motzi am Fr 14.05.04 14:50, insgesamt 1-mal bearbeitet
scrooge Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 200



BeitragVerfasst: Fr 14.05.04 14:30 
Nehmen wir mal eine Möglichkeit. Ich weiß, dass man mit CreateToolHelp32Snapshot, Infos über Prozersse bekommen kann, aber seit wann kbekommt mna damit auch die Parent-Prozesse ??
toms
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1099
Erhaltene Danke: 2



BeitragVerfasst: Fr 14.05.04 14:36 
Hi,

Mit TProcessInfo.th32ParentProcessID
scrooge Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 200



BeitragVerfasst: Sa 15.05.04 20:53 
Danke !!