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.
精彩评论