When you want to use controls on the Web that require license keys, how do you provide the license key for the control? If you embed the license key in the HTML document in which you are using the control, anyone who downloads your Web page will be able to freely use the control. The control developer would not be very happy with you if you did this.
What Microsoft decided to do to prevent this situation is to create a License Manager in Internet Explorer. The License Manager is another ActiveX control that has to be included in your HTML document, before any of the other controls that require runtime licenses. The License Manager requires a single parameter, “LPKPath,” which should contain the URL for a license pack that you place on your Web site. The HTML syntax for the License Manager is as follows:
<OBJECT CLASSID="clsid:5520cb21-c88d-11cf-b347-00aa00a28331"> <PARAM NAME="LPKPath" VALUE="MyLicPack.LPK"> </OBJECT>
![]()
The .LPK file name used in the value for the license pack should be a relative URL. While this won’t prevent unscrupulous users from downloading the license pack for their own use, it will make it more difficult.
To create a license pack to use with the ActiveX controls on your Web pages, you will need to use the Lpk_tool.exe utility included in the ActiveX SDK and in the Tools directory on the Visual Basic 5.0 CD ROM. Create a license pack by following these steps:
Run the Lpk_tool.exe utility using the Start, Run command from the Start menu.
Select the controls that you need to include on your Web page from the list of controls on the left side of the window, as in Figure 4.23. These are all of the controls for which you have a valid license on your system.
The License Pack Authoring Tool will provide you with a list of controls currently installed on your system for which you can include the license keys in the license pack.
Click the Add button to move the selected controls to the right side of the window, as in Figure 4.24.
The License Pack Authoring Tool will build a list of the controls that will be included in the license pack.
Once you have included all of the controls that you will be using on the Web page, click on the Save & Exit button. You will be presented with a Save As dialog, where you will need to specify the .LPK file name to use for the license pack, as in Figure 4.25. This file name will be the license pack name that you use in the LPKPath value in the HTML document.
The .LPK file name that you specify will be the name that you need to use in your HTML document as part of the license pack URL.
![]()
Before including any licensed control in a Web page, or as part of a custom ActiveX control, be sure that you have a valid redistribution license, and that the redistribution license permits use of the control on the Internet. If you do not have a valid redistribution license, you may be opening yourself up to legal action on the part of the component’s creator.