Board index » delphi » Start external applications and check if they are still running

Start external applications and check if they are still running


2006-10-28 04:11:11 AM
delphi146
Hello,
I need to start several other Delphi executables from my main
application. They run independantly.
But when the main application is closed I need a way to check if there
are still any applications open that have been started from the main
application.
How can I do this?
I start the applications with Shellexecute.
Does this give me an id of the started application that I can check if
it's still running?
Thx,
Bernaert Dominique.
 
 

Re:Start external applications and check if they are still running

At 22:11:11, 27.10.2006, Bernaert Dominique writes:
Quote
Hello,

I need to start several other Delphi executables from my main
application. They run independantly. But when the main application is
closed I need a way to check if there are still any applications open
that have been started from the main application. How can I do this?

I start the applications with Shellexecute.
Does this give me an id of the started application that I can check if
it's still running?
Dominique, you chose the wrong group for a question like this. It is not
about any 3rd party tools. Try borland.public.delphi.nativeapi.win32
instead.
I the meantime, Google for "delphi WinExecAndWait32". The source for that
will give you a hint on how to do what you want. Also have a look at the
help for the CreateProcess Win32 API function.
www.swissdelphicenter.ch/en/showcode.php
Crossposted to and Followup-to set to
borland.public.delphi.nativeapi.win32 .
--
Rudy Velthuis [TeamB] rvelthuis.de/
"Wit is educated insolence."
-- Aristotle (384-322 B.C.)
 

Re:Start external applications and check if they are still running

"Rudy Velthuis [TeamB]" <XXXX@XXXXX.COM>writes:
Quote
At 22:11:11, 27.10.2006, Bernaert Dominique writes:
>I need to start several other Delphi executables from my main
>application. They run independantly. But when the main application is
>closed I need a way to check if there are still any applications open
>that have been started from the main application. How can I do this?
<snip>

www.swissdelphicenter.ch/en/showcode.php
Or, better check the source of WinWget <www.{*word*104}shade.us/winwget/>--they have a nice unit for it and seems to be better and robust than any of the tricks mentioned above.
--
<?php echo 'Just another PHP saint'; ?>
Email: rrjanbiah-at-Y!com Blog: rajeshanbiah.blogspot.com/
 

Re:Start external applications and check if they are still running

"R. Rajesh Jeba Anbiah" <XXXX@XXXXX.COM>wrote in
Quote

"Rudy Velthuis [TeamB]" <XXXX@XXXXX.COM>writes:
>At 22:11:11, 27.10.2006, Bernaert Dominique writes:
>>I need to start several other Delphi executables from my main
>>application. They run independantly. But when the main application
>>is closed I need a way to check if there are still any applications
>>open that have been started from the main application. How can I do
>>this?
<snip>
>
>www.swissdelphicenter.ch/en/showcode.php

Or, better check the source of WinWget
<www.{*word*104}shade.us/winwget/>--they have a nice unit for it
and seems to be better and robust than any of the tricks mentioned
above.

Or, use TJvCreateProcess component from JVCL.
--
Best regards.
M. Utku Karatas