如何定义,系统中DEP为ON
德尔福Xe; XP、Vista、Win7、WSrv2008R2;
0.DEP(数据执行保护) CPU 支持
Function isCpuDEP:bool;
begin
Result:=... //???
end;
1.如何定义,DEP 在系统中处于开启状态?
Function isEnableDEP:bool; // Win Xp comparable
begin
Result:=false;if isCpuDEP=false then exit;
Result:=... //???
end;
2.定义,如果DEP已启用,并且还为所有程序和服务启用?
Function isEnableDEPForAllProgram:bool;
begin
Result:=false;if isEnableDEP=false then exit;
Result:=... //???
end;
3.获取DEP程序列表?
Function GetDEPProgramList:TStringList;
begin
Result:=nil;if isEnableDEPForAllProgram=false then exit;
Result:=Tstringlist.Create;
Result:=... //???
end;
DelphiXe; Xp,Vista,Win7,WSrv2008R2;
0.DEP(Data Execution Prevention) CPU supported
Function isCpuDEP:bool;
begin
Result:=... //???
end;
1.How to define, DEP is ON in system?
Function isEnableDEP:bool; // Win Xp comparable
begin
Result:=false;if isCpuDEP=false then exit;
Result:=... //???
end;
2.To define, that if DEP it is enabled, and also enabled for ALL programs and services?
Function isEnableDEPForAllProgram:bool;
begin
Result:=false;if isEnableDEP=false then exit;
Result:=... //???
end;
3.Get DEP program list?
Function GetDEPProgramList:TStringList;
begin
Result:=nil;if isEnableDEPForAllProgram=false then exit;
Result:=Tstringlist.Create;
Result:=... //???
end;
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
下面使用
GetProcessDEPPolicy
对于第 (1) 点:对于第 (2) 点,可以使用
GetSystemDEPPolicy
中类似的时尚。对于第 (3) 点,您可以枚举进程并找出使用 DEP 运行的进程。
The below uses
GetProcessDEPPolicy
for point (1):For point (2), you can use
GetSystemDEPPolicy
in a similar fashion.For point (3), you can enumerate processes and find out the ones running with DEP.
Win32_OperatingSystem
阅读有关这些属性的 MSDN 文档以查看说明。
检查此示例应用程序
The
Win32_OperatingSystem
WMi class has 4 properties which report the status of DEPRead the MSDN documentation about these properties to see the description.
Check this sample application
这是一种简单但非正统的检查 DEP 的方法,但它仅适用于当前程序
Here is a simple but unorthodox method of checking for DEP but it works only for current program