简体   繁体   English

是否可以拦截第三方应用程序的WIN32异常?

[英]Is it possible to intercept WIN32 Exceptions for 3rd party applications?

Is it possible to intercept WIN32 exceptions for 3rd party applications? 是否可以拦截第三方应用程序的WIN32异常?

I have a particularly bad behaving 3rd party application for which I'm try to intercept unhandled exceptions so I can know that I need to kill the process but I'm finding it hard to find anything about this subject that seems to fit what I need. 我的第三方应用程序行为特别糟糕,我试图拦截未处理的异常,因此我知道我需要终止该过程,但是我发现很难找到与此主题相符的东西,而这些东西似乎都符合我的需求。

Any help would be appreciated. 任何帮助,将不胜感激。

-Thanks. -谢谢。

If the exceptions are truly unhandled, you can use CreateRemoteThread and SetUnhandledExceptionFilter. 如果确实未处理异常,则可以使用CreateRemoteThread和SetUnhandledExceptionFilter。

If not (ie the program does not actually crash), you could write a simple debugger and intercept all exceptions, whether handled or not. 如果不是这样(即程序实际上没有崩溃),则可以编写一个简单的调试器并拦截所有异常,无论是否处理。

You can use ADPlus to intercept unhandled Win32 exceptions and notify you via Windows messenger service. 您可以使用ADPlus拦截未处理的Win32异常,并通过Windows Messenger服务通知您。 However, as commented, if the misbehaving application keeps running after the exception is thrown, it means the exception is actually caught and handled, and ADPlus won't be that useful. 但是,正如所评论的那样,如果行为异常的应用程序在引发异常后继续运行,则意味着实际上已捕获并处理了异常,而ADPlus不会那么有用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM