Target Platform for Password Protected .NET Applications

The ProtectKit.NET assembly Newtone.ProtectKit.Win.Password.dll is built with a target platform of AnyCPU. This allows you to protect both 32 bit and 64 bit applications.

If you have choosen to build your application with at target platform of AnyCPU, then there are some important considerations when deploying to a 32 bit operating system or to a 64 bit operating system.

For applications running on a 32 bit Operating System

The DllFileName property allows you to rename the ProFuncNET32.dll in order to conceal the fact that your application is being protected. You must be sure to set the name of the ProFuncNET32.dll (either "ProFuncNET32.dll" or the name of this dll if you have renamed it) into the protectResDll parameter of the Initialize method.

For applications running on a 64 bit Operating System

The DllFileName property allows you to rename the ProFuncNET64.dll in order to conceal the fact that your application is being protected. You must be sure to set the name of the ProFuncNET64.dll (either "ProFuncNET64.dll" or the name of this dll if you have renamed it) into the protectResDll parameter of the Initialize method.

Examples for Enabling Protected Applications with a Target Build of AnyCPU

Building your protected application with a target platform of AnyCPU allows the application to run as a 32 bit application on a 32 bit OS and as a 64 bit application on a 64 bit OS.

A. Application code switches files:
Depending on whether your protected application is running on a 32 bit OS or a 64 bit OS, your application code changes the file set in the DllFileName property and the protectResDll parameter of the Initialize method.

B. Install the appropriate files when your protected application is installed:
Place the necessary files for enabling protection on 32 bit operating systems (ProFuncNET32.dll, ProInfo32.dll, etc.) in one folder and the necessary files for enabling protection on 64 bit operating systems (ProFuncNET64.dll, ProInfo64.dll, etc.) in another folder. Structure your installation routine to install the correct files depending on whether the installation is executed on a 32 bit machine or a 64 bit machine.

Examples for Enabling Protection on Applications with a Target Build of (x86) or (x64)

When the target platform is set to (x86) or (x64) it is quite simple because it is only necessary to copy the appropriate files for enabling protection for that operating system. In other words, there is no need to "switch" files because the protected application will only run on a single target platform.