码迷,mamicode.com
首页 > Web开发 > 详细

NXOpen VB.Net / C# Sign

时间:2014-09-11 23:41:02      阅读:1304      评论:0      收藏:0      [点我收藏+]

标签:des   style   io   java   ar   for   art   sp   cti   

An executable for any application must be "signed" before it can be executed by anyone who does not have an NX Open Author license.  This section describes the signing process. This process is typically performed when an application is distributed to the user base and is used to verify that application have been developed using a valid NX Open Author license.

The following two steps define the general signing process.

  1. A resource file must be added to the source files. The resource must be compiled and linked with the executable. This step is not required for Java applications.

  2. Run the signing utility to add an encrypted string to the executable.

When running without an NX Open Author licenses NX will check for this encrypted string when the application is loaded.  If NX does not find an NX Open Author license or signature it will not load the executable, or in Batch mode the Common API will fail to initialize.

  • The signing utility may only be executed if an NX Open Author license if available.

  • The signing utility also provides a verify option that will display a message confirming whether the file has been correctly signed or not.

  • Running the signing utility multiple times on the same executable does no harm, the results are the same as running it once.

  • Journals and GRIP programs do not need to be signed.  All other NX Open applications must be signed.

 

VB.NET Example:

    1.Add NXOpen.dll / NXOpen.Utilities.dll /NXSigningResource.res three files to Project Resource

      1.1 Right click Project property and Enter Project Property Page 

      1.2 Select "Resource"

      1.3 Add Exist File --> Select "NXSignResource.res" /"NXOpen.Utilities.dll" / "NXOpen.dll "  to Project

    2.Build your project

    3.Start you command line and enter you <UGII_Install_Directory>\UGII

    4.To sign an executable run SignDotNet at a command line prompt and provide the name of the executable such as " SignDotNet your application"

      if it is success , you can find below message ; 

          Checking for the presence of DotNet Author License Signed assembly file your application

    5. Verify. if you want to verify signature whether or not success.Add "-Verify " in commad line.Result message as below.

          Assembly your application is correctly signed with a NXOpen signature.

 

  

 

NXOpen VB.Net / C# Sign

标签:des   style   io   java   ar   for   art   sp   cti   

原文地址:http://www.cnblogs.com/zekai/p/3967407.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!