且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在VC ++中重新启动我自己的应用程序

更新时间:2023-10-16 15:48:52

编写程序,该程序将:

  • 等待您的应用终止
  • 再次运行.

调用此程序,然后退出您的应用程序.该解决方案被广泛使用.

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

另一个选择:

使用特定参数(例如/重新启动)调用您的应用程序.新实例应等待旧实例终止后再执行任何任务.然后关闭旧实例.

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.