To bypass the Data Execution Prevention (DEP) asking to be turned off when connecting a .NET application with anyActiveX API at windows 7/8 and above, whichis not good because it is a security breach and it became difficult to do this each time for each plug-in since almost everyone has Windows 7 and above now. The developersmust run the below script on any EXE released from .NET that uses VertexFX ActiveX API. This script must run from the Visual Studio Command Prompt.
The next steps will show youhow to run the VS Command Prompt:
A- In windows 8.1
- 1- On theStartscreen, pressCTRL + TABto open theAppslist and then pressV. The list will include all installed Visual Studio command prompts. (To open theStartscreen, press the Windows logo keyon your keyboard.)
- 2-Choose theDeveloper Command Prompt(or the command prompt you want to use).
B- In Windows 8
- 1– On theStartscreen, press the Windows logo key+ Z.
- 2- Choose theApps viewicon at the bottom of the screen and then pressV. The list will include all installed Visual Studio command prompts.
- 3-Choose theDeveloper Command Prompt(or the command prompt you want to use).
C- In Windows 7
- 1- ChooseStart, expandAll Programs, and then expandMicrosoft Visual Studio.
- 2- Depending on the version of Visual Studio you have installed, chooseVisual Studio Tools,Visual Studio Command Prompt, or the command prompt you want to use.
After you run the VS Command Prompt, run the below command link:
editbin.exe /nxcompat:no “c:pathtoexefile.exe”
* Note that you must change the path to your EXE’s path.
After that, this EXE will be compatible with all versions of Windows without the need to do anything on the end-users machines.
This EXE (which you ran the script on it) must be packaged and delivered to the end-users.
Related Topics: