Autor Beitrag
Ryder
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 17



BeitragVerfasst: Mo 28.04.03 10:22 
Hi,

ich versuche gerade, eine Instanz eines Programmes zu schließen, das von einem meiner Delphi-Progs gestartet wurde.

Wie kann ich das bewerkstelligen?
Tino
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Veteran
Beiträge: 9839
Erhaltene Danke: 45

Windows 8.1
Delphi XE4
BeitragVerfasst: Mo 28.04.03 12:43 
Hi,

wenn Du die Programme mit Suche in: Delphi-Forum, Delphi-Library CREATEPROCESS startest bekommst Du das Handle der Anwendung (ich glaube in der Variable ProcessInformation). Mit diesem Handle kannst Du die Anwendung auch wieder schließen. Such einfach mal hier im Forum.

Gruß
Tino


Zuletzt bearbeitet von Tino am Do 28.08.03 13:44, insgesamt 1-mal bearbeitet
Ryder Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 17



BeitragVerfasst: Mo 28.04.03 13:08 
Danke!!

mal schaun ob ich was finden kann.
Ryder Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 17



BeitragVerfasst: Mo 28.04.03 13:47 
Hi

also, das mit CreateProcess funktioniert ja wirklichgut. ich kan jetz Opera - genau wie bei WinExec - die Seite übergeben, die es starten soll.

Allerdings weiß ich jetzt immer noch nicht, wie ich das Fenster auch wieder schließen Kann.

Ich soll über ein Handle zugreifen. Aber WIE?
Motzi
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 2931

XP Prof, Vista Business
D6, D2k5-D2k7 je Prof
BeitragVerfasst: Mo 28.04.03 14:14 
Ryder hat folgendes geschrieben:
[..] ich kan jetz Opera - genau wie bei WinExec - die Seite übergeben [..]

WAAH! Noch einer der WinExec verwendet..! ;) WinExec ist nur noch aus Kompatibilitätsgründen vorhanden und sollte nicht(!!!), auf gar keinen Fall(!!!) mehr verwendet werden!! ;)

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



BeitragVerfasst: Mo 28.04.03 17:20 
Das hab ich mittlerweile ja schon begriffen!

Doch leider hilft mir dieser konstruktive Beitrag nicht bei meinem Problem weiter!

:(
Motzi
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 2931

XP Prof, Vista Business
D6, D2k5-D2k7 je Prof
BeitragVerfasst: Mo 28.04.03 17:33 
Ryder hat folgendes geschrieben:
Doch leider hilft mir dieser konstruktive Beitrag nicht bei meinem Problem weiter!

Achja, da war ja nochwas.. wenn du das Process-Handle hast kannst du das Prog per Suche in: Delphi-Forum, Delphi-Library TERMINATEPROCESS brutal abschießen. Andre Möglichkeit: mit EnumWindows die Fenster, per Suche in: Delphi-Forum, Delphi-Library GETWINDOWTHREADPROCESSID die ProcessID ermitteln, mit der ProcessID des gestarteten Prozess vergleichen und bei Übereinstimmung eine Suche in: Delphi-Forum, Delphi-Library WM_QUIT Message senden...

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



BeitragVerfasst: Mo 28.04.03 18:27 
Ok, das hört sich doch vielversprechend an. leider versteh ich nur Bahnhof. Könntest du mir das mal in einem kleinen Code-Block zusammenfassen, dann steig ich glaub ich eher durch.

Danke.