exe文件崩溃了,dll怎么知道exe文件是否正在运行? [英] An exe gets crashed,how dll know whether exe is running or not ?

查看:120
本文介绍了exe文件崩溃了,dll怎么知道exe文件是否正在运行?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好!

我的exe崩溃了,现在dll需要知道(exe所使用的)exe崩溃了.并将调用dll的析构函数并释放内存.

如果找到任何解决方案,请共享示例代码.

谢谢大家!

问候
arjun

Hi All!

My exe get''s crashed and now the dll need to know (which is used by exe)exe get''s crashed. And will call destructor of dll and release the memory.

If you find any solution, please share the sample code.

Thanks to all!

Regards
arjun

推荐答案

当应用程序作为大多数其他资源(特定于该进程)终止时,内存将自动释放.
如果默认处理不充分,则可以尝试在主对象中进行全局捕获,以便在必要时进行一些额外的清理.
Memory is automatically released when an application is terminated as most other resources (that are specific to the process).

If default handling is not adequate, you might try to have a global catch in your main that will do some extra cleanup as necessary.


这篇关于exe文件崩溃了,dll怎么知道exe文件是否正在运行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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