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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to restart my application?

Status
Not open for further replies.

julych

Programmer
Dec 21, 2002
14
BG
Which is the most efficient way to restart my dialog box application, I mean to close the application and to start it again immediately after that.


 
the best way is to do it manually.

Ion Filipski
1c.bmp

ICQ: 95034075
AIM: IonFilipski
filipski@excite.com
 
- call GetCommandLine to get the command line which started the program
- call CreateProcess (or a spawn variant) to start a new instance of your program, passing the original command line
- exit

You can find more information about the functions mentioned in the MSDN Library


Marcel
 
Fastest would probably be to just let it enter its initial state by itself, ie not restart it at all.
What do you wish to accomplish?

/Per

if (typos) cout << &quot;My fingers are faster than my brain. Sorry for the typos.&quot;;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top