Terminating an application

  • Thread starter Thread starter Dino Buljubasic
  • Start date Start date
D

Dino Buljubasic

I have application A and B

Application A runs from its main() checks if B exists and if it does,
runs application B (which also strarts from its main()).

in task manager I can see A.exe and B.exe processes running

I would like to closse A either while B is running or when B closes
but when I close application B, application A still stays running in
Task Manager.

How do I close both of these applications?

Regards
D.

Both applications are part of the same solution
 
* Dino Buljubasic said:
I have application A and B

Application A runs from its main() checks if B exists and if it does,
runs application B (which also strarts from its main()).

in task manager I can see A.exe and B.exe processes running

I would like to closse A either while B is running or when B closes
but when I close application B, application A still stays running in
Task Manager.

How do I close both of these applications?

You could call 'WaitForExit' for the shelled app's 'Process' object and
then exit application A if the shelled application is terminated.
 
Back
Top