Explanation of the sample programs for Win32(64) environments:

The ProtectKit3.5 includes several sample programs for Win32(64) 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 Win32(64)\Sample Programs (Win32-64)\" under the directory where the ProtectKit3.5 was installed. Below is a list of these sample programs and a brief explanation for each.

IMPORTANT: In all of these sample projects and programs, the Lockword used is "AbcdefgH". If you are using the ProtectKit3.5 trial version, you MUST use the Lockword "AbcdefgH". It cannot be changed. If you are using the ProtectKit3.5 retail version, you can choose a different lockword between 8 and 64 alpha-numeric characters.

32 bit application samples:

CBuilder6:

This is a 32 bit sample program built in CBuilder6. To run the sample, copy the ProInfo32.dll and the ProFunc32.dll in the same directory as the Project1.exe. If the Project1.exe is not already built, build it. Then use the Set Password Protection Tool for Win32-64 (Pr3SetProtect.exe) to set protection into the Project1.exe. You can now run the sample. To unlock the application, use the Password Generator (Pr3PassGen.exe) to generate and unlock password.

 

Delphi6:

This is a 32 bit sample program built in Delphi6. To run the sample, copy the ProInfo32.dll and the ProFunc32.dll in the same directory as the Project1.exe. If the Project1.exe is not already built, build it. Then use the Set Password Protection Tool for Win32-64 (Pr3SetProtect.exe) to set protection into the Project1.exe. To unlock the application, use the Password Generator (Pr3PassGen.exe) to generate and unlock password.

 

Protect_2EXE:

This is a 32 bit sample program containing two executable files, one built in VB6 and the other built in VC++6. In this sample, the two executable programs, Project1.exe and Project2.exe, have the same protection and share the same protection file. When one executable program is unlocked, the other executable program is also unlocked.

To relate two executable programs to the same protection file, in the initialization code of each program do the following:

     Project1.exe
          PK3Initialize("Project1.exe", "ProInfo32.DLL");

     Project2.exe
          PK3Initialize("Project2.exe", "ProInfo32.DLL");

If the protection type is set to "number of uses", then the total number of uses will be the total uses of Project1 + Project2.

After the 2 executable program EXEs were built, the Set Password Protection tool was used and Standard Protection was set. Please use the Password Generator (Pr3PassGen.exe) to unlock the programs. To change the protection type, run the Set Password Protection tool and use the ProInfo32.dll, Project1.exe, and Project2.exe that are in the same folder.

 

Protect_DLL:

This sample program illustrates how to add protection to a DLL file that is being called by an EXE.

In the Protect_DLL folder are the following files:

     Protect_DLL
     |     Project1.exe: The EXE that calls the protected Sample.dll
     |     Sample.dll: The DLL file that is protected
     |     ProFunc32.dll: The ProtectKit3 function file. If this file is not in the same folder as the Project.exe and Sample.dll, please copy it to this folder.
     |     ProInfo32.dll: The protection information file. If this file is not in the same folder as the Project.exe and Sample.dll, please copy it to this folder.
     |
     |-- Vb6_EXE
     |     The VB6 project that creates the Project1.exe. (The EXE file that calls the protected DLL).
     |
     |-- Vb6_DLL
     |     The VC++6  project that created the Sample.dll. (This Sample.dll is protected using the Set Password Protection Tool)

Protection
Please use the Set Password Protection Tool (Pr3SetProtect.exe) to set protection inot the Sample.dll

Execute
When Project1.exe is executed the protection functions are called in the following manner:
Project1.exe <---> Sample.dll <---> ProFunc32.dll <---> ProInfo32.dll

 

Vb6:

This is a 32 bit sample program built in Visual Basic 6. To run the sample, copy the ProInfo32.dll and the ProFunc32.dll in the same directory as the Project2.exe. If the Project2.exe is not already built, build it. Then use the Set Password Protection Tool for Win32-64 (Pr3SetProtect.exe) to set protection into the Project2.exe. To unlock the application, use the Password Generator (Pr3PassGen.exe) to generate and unlock password.

 

Vb6_2:

This is a 32 bit sample program built in Visual Basic 6. It is similiar to the above sample called "Vb6" except this sample shows how to display a dialog that asks for an unlock password. To run the sample, copy the ProInfo32.dll and the ProFunc32.dll in the same directory as the Sample1.exe. If the Sample1.exe is not already built, build it. Then use the Set Password Protection Tool for Win32-64 (Pr3SetProtect.exe) to set protection into the Sample1.exe. To unlock the application, use the Password Generator (Pr3PassGen.exe) to generate and unlock password.

 

Vc6:

This is a 32 bit sample program built in Visual C++ 6. To run the sample, copy the ProInfo32.dll and the ProFunc32.dll in the same directory as the Project1.exe found in the Release folder. If the Project1.exe is not already built, build it. Then use the Set Password Protection Tool for Win32-64 (Pr3SetProtect.exe) to set protection into the Project1.exe. To unlock the application, use the Password Generator (Pr3PassGen.exe) to generate and unlock password.

64 bit application samples:

VisualC++2005:

This is a 64 bit sample program built in VisualC++ 2005. To run the sample, copy the ProInfo64.dll and the ProFunc64.dll in the same directory as the Project1.exe found in the "x64\Release" folder. If the Project1.exe is not already built, build it. Then use the Set Password Protection Tool for Win32-64 (Pr3SetProtect.exe) to set protection into the Project1.exe. To unlock the application, use the Password Generator (Pr3PassGen.exe) to generate and unlock password.

How to run the samples:

To run an EXE built from these projects, copy the ProtectKit's ProFunc32(64).dll and the ProInfo32(64).dll into the same folder as the EXE.

After you have copied these files, run the Set Password Protection tool (Pr3SetProtect.exe) and set the appropriate protection information into the ProInfo32(64).dll and EXE. The Set Password Protection tool sets the protection information both the protection information file and into the executable program. It is this one to one correspondence between the ProInfo file and the protection information embedded into your application that enables protection. If you want to change the Lockword, you will need change the Lockword check code in your application and rebuild it. Then use the Set Password Protection Tool again to set the Lockword into the protection information.

For more information about that, please see step #1 and #2 in Password Protection: Example For Win32(64) Apps.

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:

Rename the ProInfo32.dll, ProInfo64.dll, ProFunc32.dll, and ProFunc64.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 ProFunc64.dll

The ProInfo64.dll, ProFunc64.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 ProFunc32.dll.