C ++ - 捕获所有异常? [英] C++ - catch all exceptions?

查看:126
本文介绍了C ++ - 捕获所有异常?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想将一个DLL注入一个进程。一旦这个DLL在那里,它应该抓住&正确处理过程中发生的所有访问冲突异常。有没有办法完成这个?

解决方案

SetUnhandledExceptionFilter(函数)如何? >

功能的原型是:

  LONG __stdcall ExceptionHandler(EXCEPTION_POINTERS * ExceptionInfo); 

我已经使用此功能创建崩溃转储等。


I want to inject a DLL into a process. Once this DLL is in there, it should catch & properly handle all access violation exceptions which occur in the process. Is there any way to accomplish this?

解决方案

How about SetUnhandledExceptionFilter( function )?

function's prototype is:

LONG __stdcall ExceptionHandler(EXCEPTION_POINTERS *ExceptionInfo);

I've used this function to create crash dumps, etc.

这篇关于C ++ - 捕获所有异常?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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