User`s manual

SDK 2 Programmer’s Guide Developing User Applications
3-5
Using EXE2AP
After successfully generating an EXE file, you will need to use Exe2ap.exe to convert the EXE
file into an AP file that has an embedded “Private Key.” This must be done before downloading
the AP file to the NPort.
Protect Your Software with Private Key
System integrators often provide their proprietary knowledge to solve particular problems for their
customers. Once you start providing NPort PCG as a platform for other users, you will need to
manage and protect your intellectual property that is embedded in the NPort PCG. For this reason,
Moxa PCG provides a private key that you can embed into your application (AP). The target PCG
should have the same private key, which can be set up with SDK Manager. The Moxa OS
automatically checks to make sure that the private key in the AP and kernel match.
Embedding a Private Key in your Application
To embed a private key in the target AP (e.g., sdkser23.exe) first run the program Exe2ap.
Next, take the following steps to complete the process of embedding a private key:
1. Type the private key in the “Private Key” field. E.g., you could choose “23ji5rj34g” as the
private key.
2. Click on the folder icon to the right of EXE file and then navigate to the EXE file you would
like to convert (e.g., SDKSER23.EXE).
3. The name of the target AP file (SDKSER23.AP, for this example) will appear in the
Protected User Application text input box. If desired, you can change the file name, or click
on the folder icon and navigate to a different folder in which you would like to store the
resulting AP file.
4. Prior to downloading and running the AP file, use SDK Manager to set up the same private
key for the NPort. Refer to next section for more details.