Restarting the Application
-
Hi All! How can I restart my application by API functions?
-
Hi All! How can I restart my application by API functions?
I Think There is no Direct Way. One Way Is To Execte Program in A Batch File (.bat or .cmd) And Check The Exit Value of App. if You want To Restart App from Other App.(i.e. A Service) You can use TerminateProcess() API And spawn() or Other Execution Function(Execute(), ....)
-
Hi All! How can I restart my application by API functions?
Do you want to restart the application from this application itself?
Jesus Loves:rose:
--Owner Drawn:rose: --Nothing special --Defeat is temporary but surrender is permanent --Never say quits --Jesus is Lord:rose:
-
Do you want to restart the application from this application itself?
Jesus Loves:rose:
--Owner Drawn:rose: --Nothing special --Defeat is temporary but surrender is permanent --Never say quits --Jesus is Lord:rose:
Yes, of course!
-
I Think There is no Direct Way. One Way Is To Execte Program in A Batch File (.bat or .cmd) And Check The Exit Value of App. if You want To Restart App from Other App.(i.e. A Service) You can use TerminateProcess() API And spawn() or Other Execution Function(Execute(), ....)
And Check The Exit Value of App How to do this? please give an example.
-
Yes, of course!
Yeah I have done that in VB.net many times. And in VC++ it must be easy too. Close all open streams, handles, and whatever resources that you are using. Equivalent to shutting down of the application but not really shutting down. Now start up your application with ShellExecute... And immediately after that quit your application. It will work.
Jesus Loves:rose:
--Owner Drawn:rose: --Nothing special --Defeat is temporary but surrender is permanent --Never say quits --Jesus is Lord:rose:
-
And Check The Exit Value of App How to do this? please give an example.
if your app is in console mode, main function returns an integer value, that is placed in errorlevel variable, that can be check in a bath file M.Mehrdad.M