如何通过API退出Win32应用程序? [英] How to exit Win32 application via API?

查看:982
本文介绍了如何通过API退出Win32应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个使用Win32 API编写的C ++ Win32应用程序,我希望强制它退出一个函数。是否有 Exit() Destroy() Abort c $ c>类似的东西会终止它?

I have a C++ Win32 application written using Win32 API and I wish to force it to exit in one of functions. Is there something like Exit() or Destroy() or Abort() something similar that would just terminate it?

推荐答案

ExitProcess 是要使用的函数,否则可以使用 exit ,注意不能保证关闭的完整性(即:你许多泄漏句柄等和线程操作将被终止,即使它们在一个操作的中间,如db commit)

ExitProcess is the function to use, else you can use exit, note that neither insure the integrity of the shutdown (ie: you many leak handles etc and threaded operations will be terminated, even if they are halfway through an operation, like a db commit)

这篇关于如何通过API退出Win32应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆