How to turn off Data execution prevention (buffer security check) using C#.net code.
-
19 มีนาคม 2555 7:47
Hi All,
I need help on turning off Data execution prevention(bufer security check) only for my application through programatically or can you please suggest me any best way to accomplish this.
Let me explain the scenario.
We have developed some agents for our product, During testing phase we observed some error messages popping up related to "Data execution prevention",and stopping our agents to start. This behavior we observed on windows 7, 64 bit machine.
We have tested this application after turning off DEP . Its working fine.
Please suggest your best solution to overcome this problem.
Regards,
Vidya
- แก้ไขโดย Vidya Panthalil 19 มีนาคม 2555 7:49
ตอบทั้งหมด
-
19 มีนาคม 2555 11:55
You can use the following command:
editbin.exe /NXCOMPAT:NO <path to your PE (i.e. EXE, DLL) file>
----
Nima Sharifimehr.
sbucsc at yahoo dot com- แก้ไขโดย Nima Sharifimehr 19 มีนาคม 2555 11:55
- เสนอเป็นคำตอบโดย Nima Sharifimehr 19 มีนาคม 2555 11:55
-
19 มีนาคม 2555 14:02
Hi Nima,
Thanks for your response. I tried to turn off DEP as you suggested. but i am getting the following error.
'editbin.exe' is not recognized as an internal or external command,
operable program or batch file.Could you please help me on this?
Regards,
Vidya
-
19 มีนาคม 2555 14:41
If you have Microsoft SDK installed on your machine, you can open a Microsoft SDK Command Prompt and it will be accessible from there. Otherwise, you can usually find it under bin folder of your VC installation, which would be something like: "c:\Program Files\Microsoft Visual Studio 10.0\VC\bin\editbin.exe". If you decide to run it from this folder, then you will need to run "vcvars32.bat" in your command prompt first and then you will be able to use "editbin.exe" from within the same command prompt console.
----
Nima Sharifimehr.
sbucsc at yahoo dot com- แก้ไขโดย Nima Sharifimehr 19 มีนาคม 2555 14:42
- เสนอเป็นคำตอบโดย Nima Sharifimehr 19 มีนาคม 2555 14:43
-
20 มีนาคม 2555 7:08
Hi ,
I have to include the above fix with my application. So I tried to include the below command in post build event of the project file. But still the problem exists .
set path=%path%;$(DevEnvDir);$(DevEnvDir)..\..\vc\bin
call "$(DevEnvDir)..\tools\vsvars32.bat"
editbin.exe /NXCOMPAT:NO "$(TargetPath)"Can any one give a hint for me to solve this issue.
Regards,
Vidya