views:

32

answers:

1

Hi all,

I am a totally unfamiliar in this C# Visual Studio programming environment but I am required to finish a task. I am sorry if my question seems silly. But I really could not understand what other posts on this site or other site on the net explaining. I need a step by step guide to do this final step to accomplish my task.

I have been given an application called MCC written using Visual Studio 2008. However, this application could not run properly in Window Vista due to the issue of DEP. MCC has a function to display video from an IP camera. This required the ActiveX control of AxGif89aLite. However, DEP in Vista is by default enabled. The flag IMAGE_DLLCHARACTERISTICS_NX_COMPAT in PE header do not allow this control to be used. Several tests have been run and identified this is the problem.

From an article online, http://blog.dyadica.net/archives/data-execution-prevention-workaround, they suggest I need to add the below to MCC post build event.

call $(DevEnvDir).. \tools\vsvars32.bat
editbin.exe /NXCOMPAT:NO $(C:\Program Files\Aerocut\MCC\MCC2.exe)

So, I add this and rebuild the MCC solution file. Then, I cannot get what this last step required me to do.

Please note that if you sign the binary in Visual Studio, flipping the IMAGE_DLLCHARACTERISTICS_NX_COMPAT flag in the post build step after the binary has been signed will result in an assembly that will fail strong name validation. To work around this sign your binary as part of the post build steps. To do this, use SN.EXE from the Windows SDK.

I am really confused what is this signing binary.

  1. From information that I googled, signing an application is getting a certificate for the program so that it is more secured, am I right here?
  2. I got the SN.EXE in my computer. But, how do I sign my binary as post build step? The binary should be my compiled execution file right?

I reinstalled the MCC with the rebuilt setup file. It still give me the following error:

Unable to get the window handler for the 'AxGif89aLite' control. Windowless ActiveX controls are not supported.

Help is very much appreciated. I would like to express thank you in advance here first.

+1  A: 

If you're not signing the executable already as part of the compilation then you don't need to worry about it.

Andrew Cooper
ok. thanks andrew. but why did i still get the error even i have add the NXCOMPAT:NO to post build event? am i doing it wrong?
Eryn Ng
I have no experience playing with the NX flag. I'm not sure what's going wrong. I did notice that the path to the EXE you passed to editbin is different in your question and the subsequent comment. Are you sure that you're using the binary that you edited? Are you running editbin against the debug binary, for example, but using the binary from the release build?
Andrew Cooper