Explanation of the ProtectKit3.5 sample programs for .NET environments:

The ProtectKit3.5 includes the several sample programs for .NET environments. Using these sample programs is a good way to learn how to protect your own applications. 

The ProtectKit3.5 sample projects are included in the folder: "\Password Protection\Set Password Protection\For .NET\Sample Programs (.NET)\" under the directory where the ProtectKit3.5 was installed. Below is a list of these sample programs and a brief explanation for each.

CSharp_1 AnyCPU:
     This is a C# sample program built with target platform of AnyCPU.
     Building this project results in an .EXE called CS_Sample1_AnyCPU.exe.

CSharp_1 Executable applications:
     This folder contains the compiled executable applications from the three CSharp_1 samples. These executables files are the builds for each mode; AnyCPU, x64, and x86. See the explanation below "Compiled Executable Applications".

CSharp_1 x64:
     This is a 64 bit C# sample program built with target platform of x64.
     Building this project results in an .EXE called CS_Sample1_64.exe.

CSharp_1 x32:
     This is a 32 bit C# sample program built with target platform of x86.
     Building this project results in an .EXE called CS_Sample1_32.exe.

CSharp_2:
     This is a C# sample program built with a target platform of "AnyCPU".
     Building this project results in an .EXE called CS_Sample2.exe.

VB_1:
     This is a VB.NET sample program built with a target platform of "AnyCPU".
     Building this project results in an .EXE called VB_Sample1.exe.

VB_2:
     This is a VB.NET sample program built with a target platform of "AnyCPU".
     Building this project results in an .EXE called VB_Sample2.exe.

IMPORTANT: In all of the above sample projects and programs, the Lockword used is "AbcdefgH". This Lockword is set in the Stream Property of the PasswordProtect Class located in each project's form.

How to build the samples:

Open a sample project in Visual Studio and rebuild the project. You may get the following error....

The type or namespace name 'Newtone' could not be found (are you missing a using directive or an assembly reference?)"

If you do, copy the Newtone.ProtectKit.Win.Password.dll into the project's bin folder and try rebuilding the project again. We have provided a .NET Framework 2 version and a .NET Framework 4 version of this DLL. Please use the appropriate Newtone.ProtectKit.Win.Password.dll depending your version of Visual Studio.

How to run the samples:

To run an EXE built from these projects, copy the ProtectKit's ProFuncNET32(64).dll and the ProInfo32(64).dll into the same folder as the EXE.
Also copy the Newtone.ProtectKit.Win.Password.dll into the same folder as the EXE. There are two versions of this DLL, one for .NET Framework 2.0 and another for .NET Framework 4.0. Please be sure to copy the appropriate DLL.

After you have copied these files, run the Set Password Protection tool (PrNETSetProtect.exe) and set the appropriate protection information in to the ProInfo32(64).dll. The Set Password Protection tool will also create a .dat file (ProInfo32(64).dll.dat) that you must embed in your .NET application as a resource. If you change the Lockword, you will need to embed the .dat file in the Stream property of the PasswordProtect class and in the appropriate place in the code, change "AbcdefgH" to the value you want and build the project.

For more information about that, please see step #2 and #3 in Password Protection: Example For .NET Apps.

Compiled Executable Applications

For convenience, the three CSharp_1 sample programs have been compiled and their executable applications included in a folder called CSharp_1 Executable applications. These executables files are the builds for the above CSharp_1 sample programs for each mode; AnyCPU, x64, and x86.

IMPORTANT: We have used an obfuscating tool (Spices.NET) to obfuscate these runtime applications (exe). Obfuscating your application prevents tools like the Reflector from being used to decompile your application. BE SURE to obfuscate your .NET programs and encrypt strings so that your lockword remains secret.

The compiled executable applications are listed below with a brief explanation for running the app.

     CS_Sample1_AnyCPU.exe
    CS_Sample1_64.exe
    CS_Sample1_32.exe

AnyCPU: CS_Sample1_AnyCPU.exe

This application is built in "AnyCPU" mode. It will run as a 32 bit application on a Windows x86 (32 bit) OS. It will run as a 64 bit application on a Windows x64 (64 bit) OS.

The following files should be copied into the same folder as the EXE:
     ProInfo64.dll, ProInfo32.dll
     ProFuncNET64.dll, ProFuncNET32.dll
     Newtone.ProtectKit.Win.Password.dll

x64: CS_Sample1_64.exe

This application is built in "x64" mode. It will run as a 64 bit application on a Windows x64 (64 bit) OS. It will not on a Windows x86 (32 bit) OS.

The following files should be copied into the same folder as the EXE:
     ProInfo64.dll
     ProFuncNET64.dll
     Newtone.ProtectKit.Win.Password.dll

x86: CS_Sample1_32.exe

This application built in "x86" mode. It will run as a 32 bit application on a Windows x86 (32 bit) OS. It will run as a 32 bit application on a Windows x64 (64 bit) OS but must run on WOW64.

The following files should be copied into the same folder as the EXE
     ProInfo32.dll
     ProFuncNET32.dll
     Newtone.ProtectKit.Win.Password.dll

Explanation of the Sample Applications:

The following labels and buttons appear in the sample program.

A. Protection Type:
Shows the type of protection that was set using the "Set Password Protection" tool.

B. Protection Status:
Shows the current protection status; i.e. whether the application is locked, unlocked, etc.

C. Remaining Uses:
Shows the number of times that the application can be used. This is applicable when "Number of Uses" type protection is used.

D. Remaining Days:
Shows the number of days that the application can be used. This is applicable when "Number of Days" type protection is used.

E. Remaining Months:
Shows the number of months that the application can be used. This is applicable when "Number of Months" type protection is used.

F. Expiration Date:
Shows the date after which the application can not be used. This is applicable when "Expiration Date" type protection is used.

G. VideoCard:
Shows the video card information of the PC running the EXE.

H. Motherboard:
Shows the motherboard information of the PC running the EXE.

H. LAN card:
Shows the LAN card information of the PC running the EXE.

J. Random Numbers:
Shows any random numbers that have been set in the protection information This will not show anything if random numbers are not being used.

K. CPU:
Shows the CPU information of the PC running the EXE.

L. GET PcID (Default):
This retrieves the default PcID of the PC running the EXE. This is the default PcID information.

M. SET PcID (User Specified):
This sets the user specified PcID for the PC running the EXE.

N. GET PcID (User Specified):
This retrieves the current valid PcID, whether a default PcID or a user specfied PcID.

O. Set Password:
This sets the password needed to unlock the application.

P. Remove Registry Information:
This deletes the protection information that has been set in the registry.

Improving Security

To improve the strength of your protection we recommend the following:

1. Obfuscate your .NET applications. Tools like the "Reflector" are able to decompile .NET assemblies and expose your passwords. lockwords, and program code. When obfuscating your program, be sure to encrypt strings. This will help to keep your lockword secret.

2. Rename the ProInfo32.dll, ProInfo64.dll, ProFuncNET32.dll, and ProFuncNET64.dll files. Renaming the ProtectKit DLL files will make it harder for hackers to know how you have protected your applications with the ProtectKit.

Regarding the ProInfo64.dll ProFuncNET64.dll

The ProInfo64.dll, ProFuncNET64.dll are DLLs for 64 bit applications. If you are running a 32 bit application on a 64 bit operating system, you need to use the ProInfo32.dll and ProFuncNET32.dll.