开发者

Should an exception in injected DLL crash the whole program?

开发者 https://www.devze.com 2023-02-11 01:11 出处:网络
I\'m injecting a custom DLL into an x86 program. It\'s successfully injected, but when I cause an exception (like accessing a NULL pointer), it\'s detaching the DLL, w开发者_开发技巧ithout crashing th

I'm injecting a custom DLL into an x86 program. It's successfully injected, but when I cause an exception (like accessing a NULL pointer), it's detaching the DLL, w开发者_开发技巧ithout crashing the whole program. Is it how it should be? I want to crash the program actually. My OS is Windows 7.


What you are seeing may be the result of Windows 7's Program Compatibility Assistant. I don't think you can turn it off at the module level, if you know the target process, you can turn off at the process level.


Maybe it depends on the program? I have a DLL shell extension that I use with Windows Explorer (deskband, registered via regsrv32). If it crashes, it takes Explorer down with it. My DLL is Delphi, btw, but I don't think that matters here.

0

精彩评论

暂无评论...
验证码 换一张
取 消