开发者

How to sign a binary as part of post build step using sn.exe from Windows SDK?

开发者 https://www.devze.com 2023-01-20 02:23 出处:网络
I am a totally unfamiliar in this C# Visual Studio programming e开发者_如何学Pythonnvironment but I am required to finish a task.

I am a totally unfamiliar in this C# Visual Studio programming e开发者_如何学Pythonnvironment 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.


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

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号