how to restart my own application in VC++

霸气de小男生 提交于 2019-12-03 16:05:49

Write a program, which will:

  • Wait for your application to terminate
  • Run it again.

Call this program, then exit your application. This solution is quite widely used.


Another option:

Call your application with specific parameter (eg. /restarted). The new instance should wait for the old one to terminate before performing any tasks. Then shut down the old instance.

I think You haven't try with Google. Here is a sample project in codeProject. I think this is what you need

How To Create a Self-Restartable Application

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!