Terminating an application

  • Thread starter Dino Buljubasic
  • 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
 
H

Herfried K. Wagner [MVP]

* 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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top