如何使用c#关闭应用程序的dep(防止数据执行)? [英] how to turn off dep(data execution prevention) for an application with c#?

查看:489
本文介绍了如何使用c#关闭应用程序的dep(防止数据执行)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨 我创建了一个应用程序,该应用程序返回访问冲突错误异常,我想为此应用程序关闭dep(防止数据执行),我知道我可以使用我的电脑"->属性"->高级"->性能"将其关闭(设置)->数据异常预防等
好吗?
但是我想用C#代码和.net来完成这项工作,我知道这项工作将通过编辑boot.ini文件来完成,好吗? boot.ini文件中的文件必须找到(NoExecute = AlwaysOn)
并用AlwaysOff替换AlwaysOn,但是它会关闭所有应用程序的dep,我只想为我的应用程序关闭它,好吗?我想在启动我的应用程序时使用c#代码来执行此操作,有人可以帮助我吗? div class ="h2_lin">解决方案

而不是关闭DEP,请尝试使您的应用程序与DEP兼容-请参阅http://msdn.microsoft.com/en-us/library/ms235442%28v=VS.100%29.aspx [ ^ ].


而不是旋转DEP,请更正您的代码.


hi i created an application , that returns access violation error exception , i want to turn off dep(data execution prevention) for this application , i know that i can turn it off with My computer->properties->advanced->performance(settings)->data exception prevention and etc
ok?
but i want to do this job with c# code and .net , i know that this job will be done with edit boot.ini file ,ok? in boot.ini file must find (NoExecute=AlwaysOn)
and replace AlwaysOn with AlwaysOff,but it turn off dep for all applications,i want to turn it off only for My application,ok?and i want to do this with c# code in startup of My application,any one can help me?

解决方案

Instead of turning off DEP, try and make your application compatible with DEP - see http://msdn.microsoft.com/en-us/library/ms235442%28v=VS.100%29.aspx[^].


Instead of turning of DEP, correct your code.


这篇关于如何使用c#关闭应用程序的dep(防止数据执行)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆