The following commands are used to generate password protected applications. For 32-bit applications, use the ProFunc32.dll. For 64-bit applications, use the ProFunc64.dll

Before using the ProFunc32dll/ProFunc64.dll commands, the program which calls these commands must have a copy of the description of the DLL function declarations (header files found in folder called "Include").

For added security, we recommend that you rename the ProFunc32.dll/ProFunc64.dll to make it less obvious that you are using the ProtectKit. If you rename the ProFunc32.dll/ProFunc64.dll files, you must be sure that your program points to the renamed dll files. When using Visual Basic, in the ProtectKit3.bas file, change the references from "ProFunc32.dll/ProFunc64.dll" to the name of the renamed dll. In VC6, Delphi, and C++ Builder, change the LoadProtectKit3Dll to refer to the newly renamed dll.

Containers and Header Files

Container Header File Name
C++Builder, VisualC++ ProtectKit3.h
Delphi ProtectKit3.pas
VisualBasic ProtectKit3.bas

 

DLL Function List (in Alphabetical order)

Function Name Explanation
PK3DeleteRegistry Deletes protection information from the registry or from a file
PK3Finish Closes the ProtectKit and updates the protection information
PK3GetLockword Retrieves the lockword.
PK3Initialize Initializes the ProtectKit
PK3Internet Connects to the specified URL
PK3NextIsUnlocked Determines whether or not the next period of protection is locked or unlocked (for passwords that have an expiration date)
PK3NextQueryPassword Queries the next password (for passwords that have an expiration date)
PK3NextQueryPcID Retrieves the next PcID for passwords that have an expiration date
PK3NextQueryRandom Retrieves the Random Identifier set in the PcID retrieved by PK3NextQueryPcID
PK3NextSetPassword Sets the password using the PcID retrieved with the PK3NextQueryPcID function
PK3QueryCpuID Retrieves the CPU identifier and the CPU name from the PC.
PK3QueryHostBridgeID Retrieves the northbridge information from the PC's motherboard
PK3QueryNicAdrID Retrieves the MAC address information from the PC's network card
PK3QueryPassword Retrieves the password that has been set by the PK3SetPassword function
PK3QueryPcID Retrieves the PcID
PK3QueryPcIDofPassword Retrieves a "custom created" (user defined) PcID
PK3QueryProtect Retrieves the current protection status
PK3QueryProtectInfo Retrieves the protection information
PK3QueryRandom Retrieves the random identifier set in the PcID
PK3QueryRemainCount Retrieves how many "allowable uses" are remaining. (i.e. how many more times the application can be used)
PK3QueryRemainDays Retrieves how many "allowable days" are remaining. (i.e. how many more days the application can be used)
PK3QueryRemainMonths Retrieves how many "allowable months" are remaining. (i.e. how many more months the application can be used)
PK3QueryVideoID Retrieves the video card information
PK3SendMail Sends email
PK3SetPassword Sets the password and unlocks the application.
PK3SetPcIDofPassword Sets a custom (user created) PcID

 

Structure Definition (User defined type)

(1) C++Builder,VisualC++
typedef struct {
long                    lProtectWay;
long                    lCount;
long                    lDays;
long                    lMonths;
long                    lMonthType;
long                    lExpiration;
BOOL                  bPasswordExpiration;
long                    lPasswordType;
long                    lRegKey;
char                    szRegSubKeyS[65];
char                    szRegNameS[65];
char                    szRegSubKeyR[65];
char                    szRegNameR[65];
} PROTECTKIT3_INFO;
typedef PROTECTKIT3_INFO * PTR_PROTECTKIT3_INFO;

(2) Delphi
type
PROTECTKIT3_INFO = Record
lProtectWay:               Longint;
lCount                        Longint;
lDays:                        Longint;
lMonths:                     Longint;
lMonthType:                Longint;
lExpiration:                 Longint;
bPasswordExpiration:   LongBool;
lPasswordType:           Longint;
lRegKey:                     Longint;
szRegSubKeyS:           array [0..64] of AnsiChar;
szRegNameS:              array [0..64] of AnsiChar;
szRegSubKeyR:           array [0..64] of AnsiChar;
szRegNameR:              array [0..64] of AnsiChar;
end;

(3) VisualBasic
Type PROTECTKIT3_INFO
lProtectWay                 As Long
lCount                         As Long
lDays                          As Long
lMonths                       As Long
lMonthType                  As Long
lExpiration                    As Long
bPasswordExpiration     As Long
lPasswordType             As Long
lRegKey                       As Long
szRegSubKeyS             As String * 65
szRegNameS                As String * 65
szRegSubKeyR             As String * 65
szRegNameR                As String * 65
End Type

Explanation of the PROTECTKIT3_INFO Member Variables:

When the PK3QueryProtectInfo command is executed values are set into the PROTECTKIT3_INFO members

lProtectWay refers to the type of protection
0: Standard protection (A password must be generated to use this type of protection)
1: Number of use protection (Application is enabled for a specified number of uses, after which a password is needed)
2: Number of days protection (Application is enabled for a specified number of days, after which a password is needed)
3: Number of months protection (Application is enabled for a specified number of months, after which a password is needed)
4: Dated protection (Application is enabled until a specified date, after which a password is needed)
Note: To require an initial password for the above IProtectWay values of 1, 2, or 3; set the bPasswordExpiration to a value other than 0. See below

lCount refers to the number of times the application can be used. lCount is used when the "Number of use protection" is set (i.e. lProtectWay = 1).
The value for the number of times the application can be used is initialized prior to the application execution.

lDays refers to the number of days the application can be used. lDays is used when the "Number of days protection" is set (i.e. lProtectWay = 2).
The value for the number of days the application can be used is initialized prior to the application execution.

lMonths refers to the number of months the application can be used. lMonths is used when the "Number of months protection" is set (i.e. lProtectWay = 3).
The value for the number of months the application can be used is initialized prior to the application execution.

lMonthType refers to the start day when using "Number of months protection"
0: Starts on the day that the application is executed for the first time.
1: Starts at the beginning of the month in which the application is executed for the first time.
2: Starts at the beginning of the month following the month in which the application is executed for the first time.

For example: The application is first executed on 2010/03/16
0: "Number of months protection" begins from 2010/03/16
1: "Number of months protection" begins from 2010/03/01
2: "Number of months protection" begins from 2010/04/01

lExpiration refers to the expiration date after which the application can no longer be used. lExpiration is used when the "Dated protection" is set (i.e. lProtectWay = 4).
The value for the expiration date is initialized prior to the application execution.

When setting lExpiration use the format yyyymmdd (i.e. an expiration date of December 31, 2001 would be 20011231)

bPasswordExpiration refers to whether or not the password will expire. Use this in conjunction with lProtectWay
0: Password does not expire.
Nonzero: Password expires.

lPasswordType refers to the configuration of the password
0: Numerical
1: Alpha-numeric (letters + numerals)
2: Alpha-numeric (Capital letters + numerals)

lRegKey refers to the registry root key where protection information is stored
0: HKEY_CLASSES_ROOT
1: HKEY_LOCAL_MACHINE\SOFTWARE

szRegSubKeyS refers to the registry subroot key where the protection status is stored
szRegNameS refers to the registry item name where the protection status is stored
szRegSubKeyR refers to the registry subroot key where the protection information is stored
szRegNameR refers to the registry item name where the protection information is stored