close application after CreateProcess

  • Thread starter Thread starter carmen
  • Start date Start date
C

carmen

I need to launch application-2 from application-1 and close application-1.
My code is

CreateProcess ("app2",0,0,0,0,0,0,0,0,0);
Application.Exit();

but application-1 is not terminate since I see its name in the "Start" line.
Any ideas? Thank you.
 
Is your application-1 multithreaded?
If it is Application.Exit() will only close the main thread, but the other's
will continue to run, keeping the process open...
 
carmen said:
I need to launch application-2 from application-1 and close application-1.
My code is

CreateProcess ("app2",0,0,0,0,0,0,0,0,0);
Application.Exit();

but application-1 is not terminate since I see its name in the "Start" line.
Any ideas? Thank you.

Try this:

Environment.Exit(0)

bye
Rob
 
Back
Top