Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Activate Another Program 1

Status
Not open for further replies.

sweep123

Technical User
May 1, 2003
185
GB
I am looking for a API to activate another application from within mine, note I may need to activate several instances of this new application.

Would also like to know whats happening to each instance of these tasks; i.e. still runnng or terminated etc.

I have come across AppActivate in VB, and system and _spawnl in Visual C++. Just looking for a simple activation call with a handle, if possible.

Sweep123
 
ShellExecute(hwnd, "open", "app.exe", "", "", SW_SHOW);

--------------
"Getting to the top is an extra reward.Its the climb that makes the man."
Xerxes Dynatos
 
use CreateProcess.

Ion Filipski
1c.bmp

ICQ: 95034075
AIM: IonFilipski
filipski@excite.com
 
I agree with IonFilipski.

Use CreateProcess.

This will allow you to query the process handle, (obtained from the Process Information structure that you supply to the CreateProcess function).

You can use this handle with the WaitFor... functions to see if the process is still active or terminated.
 
OK CreateProcess it is, useful for monitoring the task etc.

Many thanks
 
Not to mention you can also terminate the process from within the app that created it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top