我最近一直在做一些关于 DEP 的研究,我在 Visual Studio 下使用链接器选项/NXCOMPAT 编译了我的代码。当我在调试器下运行可执行文件并转储 ntdll!_KPROCESS 结构时,我得到以下信息:
+0x096 Flags : _KEXECUTE_OPTIONS
+0x000 ExecuteDisable : 0y0
+0x000 ExecuteEnable : 0y1
+0x000 DisableThunkEmulation : 0y0
+0x000 Permanent : 0y1
+0x000 ExecuteDispatchEnable : 0y0
+0x000 ImageDispatchEnable : 0y0
+0x000 DisableExceptionChainValidation : 0y1
+0x000 Spare : 0y1
这表明 DEP 已禁用 (ExecuteDisable == 0)。 我想补充一点,在我的机器下启用了硬件 DEP。
最佳答案
了解 DEP in MSDN包括系统范围的设置和 /NXCOMPAT linker option与单个应用程序有关。可能还有与 DEP 相关的 BIOS 设置。
关于c++ - 在 Visual Studio 中启用 DEP,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19892714/