检查是否启用了 DEP

Check if DEP is enabled

是否可以检查是否启用了数据执行保护?

有没有和这个CMD命令功能一样的功能

wmic OS Get DataExecutionPrevention_SupportPolicy

还有returns这样的东西?

0 – DEP is disabled for all processes.
1 – DEP is enabled for all processes.
2 – DEP is enabled for only Windows system components and services. (Default)
3 – DEP is enabled for all processes.

GetSystemDEPPolicy function:

This function returns a value of type DEP_SYSTEM_POLICY_TYPE, which can be one of the following values: AlwaysOff, AlwaysOn, OptIn, OptOut.