CAUTION
We strongly recommend you investigate using Instant PLUS before using EZTrial2.
For more information please refer to the Instant PLUS Manual.
The EZTrial2 functionality in Protection PLUS is designed to be a one function call interface to implement the most common trialware implementation and optional online purchasing. We strongly recommend you investigate using Instant PLUS before using EZTrial2.
Set up Product Definition in LFEdit
Run LFEdit from Start / Programs / SoftwareKey Licensing System / PLUS.
Click Product Definition menu then Setup. Click Add to create a new product definition or select an existing one and choose Properties.

On the General Tab, it is important to change the default product name from Product1. Click on the License File Tab. Be sure to change the password to something unique. Choose a unique name for your License File. Change the File Name to the directory of your application and the License File name you chose. Click on the Trigger Code tab. Choose values for Trigger Code seed and RegKey2Seed to differentiate yourself from other PLUS users. The RegKey2Seed must be a value less than 255. Click on the EZ Trial Parameters Tab and change the properties as desired. Press F1 for a description of all of the fields and their purpose. Click on the Automation Client tab. Fill in the URL for Visit Web Site if you want this feature to be enabled. The URL for Buy Now and URL for Activation will be given to you when you sign up for the Instant SOLO e-commerce service. You can leave them blank for now. Click Ok to save all changes.
Create a License File in LFEdit
In LFEdit, make sure your product name is selected in the combo box on the toolbar. Click the New button on the toolbar then click Ok to select the highlighted product definition.

Click on the Expiration Fields Tab. Make sure the Expiration Type is D for Demo and that a hard expiration date is filled in. Even if you are letting the application run for an unlimited number of days, a hard expiration date must be filled in. To essentially disable the hard expiration date, fill in 12/31/2050. Click on the Strings tab. For String 1, put the name of your product. This will appear on the demo dialog title bar (see below). For String 2, 3, 4, and 5, put the text that you would like displayed on the demo dialog during the valuation period. For String 6, 7, 8, and 9, enter the text that you would like displayed on the demo dialog after the demo has expired or when the number of users has been exceeded when using network floating licensing. If you leave these fields blank, default strings will be used by the library. In both cases, these three strings are concatenated together, so you may need to add a space at the end or beginning of a line to make it look correct. Save the License File by clicking File / Save.
When the application is run the demo screen will look similar to the image below (default screen shown):
Some options may not be visible depending on the information entered in the Automation Client section of the Product Definition.
Legend:
Title text is read from String 1 of the license file.
Demo text is read from Strings 2,3,4, and 5 of the license file. After the demo has expired the text stored in Stings 6,7,8, and 9 of the license file are shown.
You may replace the default bitmap shown above with your own custom bitmap. This bitmap should be 64x64 pixels in size. The bitmap may be in any color format, but 256 color bitmaps are not supported and may not display properly. It must have the same name as the license file with the .bmp extension and stored in the same folder as the license file. For example, the license file is named license.ini, therefore the bitmap would be named license.bmp and in the same folder as license.ini. If no bitmap is present the default bitmap shown above will be displayed. If the client PC is running in 256 color mode no bitmap will be displayed as we do not support this color mode. The bitmap does not support transparency at this time so a background color of white will need to be used if generating your custom bitmap to match the white strip across the top of the dialog.
This option is only shown if information was placed in the product definition/Automation Client tab in LFEdit when generating the license file. The field is URL for Buy Now.
Once the demo period expires this option is not displayed.
This option brings up the Activation by Phone dialog described below. It is always displayed.
Only shown if information was placed in the product definition/Automation Client tab in LFEdit when generating the license file. The field is URL for Activation.
The expiration counts are not displayed if the demo has expired.
This is a hyperlink which when clicked will open the user’s default web browser to the specified link. The link is from the product definition/Automation Client tab in LFEdit when generating the license file. The field is URL for Visit Web Site.
Call the PLUS library within your application
There is one function to call in the library to see if your application should execute. In Visual Basic syntax, the declaration statement for this function follows:
Declare Function pp_eztrial2 Lib "keylib32.dll" (ByVal hwnd As Long, ByVal filename As String, ByVal password As String, ByVal flags As Long, ByRef errorcode As Long, ByVal lfhandle As Long) As Long
Other programming languages may use a slightly different syntax, but should be similar to the above. If you are programming in Visual C++ and are using the static link library, refer to the special resource instructions located in pp_eztrial2().
In the startup area of your application, call the above function with the parameters below:
Dim result As Long, errorcode As Long
result = pp_eztrial2(Me.Hwnd, App.Path & "\license.lf", "password", 0, errorcode, 0)
If result = 0 Then
MsgBox "Error #" & errorcode
End
End If
Me.Hwnd is the window handle to your form. If you do not have a window handle, you can substitute 0 for this parameter.
App.Path is the Visual Basic syntax that points to the directory where the application is located. This is typically where you will put the primary License File. This should be the directory that you told LFEdit to place the License File when it is created.
License.LF is the name of the License File that you chose in LFEdit. The actual name doesn't matter, but it must match the name that LFEdit is using.
Password is the License File password that you chose in LFEdit. The actual password doesn't matter, but it must match the same string that LFEdit is using.
Result is a long integer that will contain either 1 or 0. If this value is 0, your application should terminate immediately, as shown by the If statement above.
Errorcode will contain the reason why the security test failed.
The lfhandle parameter can be used to obtain a License File handle to be used to call other functions throughout the duration of your application. When the application exits, you must close the handle using the pp_lfclose() function. In most cases, this parameter is simply a NULL pointer (no handle is requested). Visual Basic does not have an easy way to pass a NULL pointer to a function such as this one. It is VERY important to pass a NULL pointer as the last parameter when not using the lfhandle by other library functions. The above Declare statement was written to compensate for Visual Basic's inability to pass a NULL pointer. To obtain the License File handle parameter, use the Declare statement below and declare a global long variable named lfhandle and pass it as the last parameter.
Declare Function pp_eztrial2 Lib "keylib32.dll" (ByVal hwnd As Long, ByVal filename As String, ByVal password As String, ByVal flags As Long, ByRef errorcode As Long, ByRef lfhandle As Long) As Long
Notice that the only difference is the last parameter is defined ByRef instead of ByVal.
Run Your Application
The application should run the number of days and times specified when you created the License File.
Activate the Application Using EZ Triggerâ„¢
Click on the Phone Unlock button on the demo dialog to display the Trigger Code dialog. Write down the two numbers on the form. These two numbers are what your customer will give you by phone, fax, or e-mail. Run LFEdit. With the correct Product Definition selected in the toolbar, click on the Trigger Codes button (lock) on the toolbar. Select Code 31 and click Select. Enter the two numbers previously written down and click Generate. Write this number down. This is the unlock code that will be given to the customer. Minimize LFEdit and enter this code into the application. You should see the "Activation Complete" message appear.
Using EZ Trial on a Network
Because most network installations do not maintain synchronized clocks, it is important that the last used time is not verified between installations, especially when License File Aliases are used. Be sure to turn off "Update last used time" in the EZ Trial Parameters tab of the product definition.
Also, when deploying your application on a peer-to-peer network along with copy protection, disable Software Binding and choose Hardware Binding COMPNO_NETNAME along with one or more other algorithms. The EZ Trial engine will automatically use COMPNO_NETNAME algorithm from all of the workstations and will use the other algorithms on the server. You will need to activate your application twice - once on the server and once on one of the workstations.
It is now recommended to run the application installed on a peer server using the UNC path or mapped drive letter, just as a workstation would, so only the COMPNO_NETNAME algorithm is used and only a single activation is required to enable the entire network.
More Information
To extend the number of days left in the evaluation, use code 24. To extend the number of executions left in the evaluation, use Trigger Code 25.