It is easy to set protection in your applications.
Set protection with a few simple steps:
Step 1: Set ProtectKit code in your application.
Step 2: Set protection information using the "Set Password
Protection Tool".
Step 3: Digitally sign your application if desired.
Step 4: Deploy Application.
Step 5: Generate a password and send it to the user.
Win32 (Win64) Example: (in Visual Basic)
Step 1: Set
ProtectKit code in your application code
Initializing the ProtectKit3.5 in the Form Load event:
Private Sub Form_Load()
Dim LockWord As String * 9
Dim ChkLockword As String
Dim LockwordLen As Long
.
ret = PK3Initialize("Project1.exe",
"ProInfo.dll")
If ret <> 0 Then
If ret
= 1 Then Msg= "Unable to run application."
If ret
= 2 Then Msg= "Unable to load protection information file."
If ret
= 3 Then Msg= "The lockword is incorrect."
.
End
End If
LockwordLen =
PK3GetLockword(LockWord)
ChkLockword = "Ab" & "cd" &
"ef" & "gH"
If LockwordLen <> 8 Or
ChkLockword <> Left(Lockword, LockwordLen) Then
End
End If
End Sub
Retrieve the PC's Hardware Signature (PcID)
Private Sub Command1_Click()
Dim str As String * 65
Dim strLen As Long
...
ret = PK3QueryPcID(str, strLen)
Text2.Text = str
...
End Sub
Set the Password
Private Sub Command2_Click()
ret = PK3SetPassword(Text1.Text)
End Sub
Check Protection Status
Private Sub Command3_Click()
ret = PK3QueryProtect()
If ret = 0 Then Msg = "Application is unlocked."
If ret = 1 Then Msg = "Application is locked."
If ret = 2 Then Msg = "Exceeded allowable number of uses."
.
End Sub
Step 2: Set protection
information
Use the Set Password Protection tool to set protection information into your application:
This tool writes protection information into a "protection information file" and also embeds the same information into your compiled application.
Step 3: Digital
signature
If you are digitally signing your application, do that at this step. If you are not digitally signing your application, proceed to Step 4.
Step 4: Deploy your
application
Deploy your application and all its associated files to the target machine.
Step 5: Generate the
password and notify the user
The Password Generator
The ProtectKit3.5 provides several ways to generate passwords. The runtime Password Generator (EXE) allows you to enter a lockword and a PcID and generate a password manually. For example, using the lockword from Step 2 and the PcID retrieved from the user's PC, you can generate a password, which you send to the enduser so that they can unlock the application.
Password Generator EXE
Password Generator OCX and DLL
These files provide the password generating functions in a useful API. This API allows you to generate passwords programmatically from the lockword and retrieved PcID and to send the passwords to your users.
Below is an example of a web application that uses VBScript code to to generate a password.
Set objCOM =
Server.CreateObject("Pr3PassGen.PassGen")
objCOM.LockWord = varLockword
objCOM.PCID = varPCID
objCOM.PasswordType = varType
varUnlockword = objCOM.PS3GetPassword
Set objCOM = nothing
Here is Visual Basic code that uses the EMail API
ret = PS3SendMail("msv.newtone.co.jp",
"info@newtone.co.jp", _
"NEWTONE", "paul@company.com", "Users", _
"PassWord Information", "Below is the password needed to
unlock....")