License packages must be inserted in HTML files using the existing <OBJECT> tag (element). The license package is interpreted by a License Manager object that is used to hand licenses to other Controls on the HTML page. The license package object must be embedded in the HTML page before any other objects that require licensing. The specific syntax for embedding license packages in HTML is as follows:
<OBJECT CLASSID = "clsid:5220cb21-c88d-11cf-b347-00aa00a28331"> <PARAM NAME="LPKPath" VALUE="relative URL to .LPK file"> </OBJECT>
Note Internet Explorer 3.0 will only honor the first license package in an HTML page. If controls on this page require licenses that are not inlcuded in this license package, then they will afil to instantiate.
The .LPK license package file is a plain text file, and must be labeled by servers with the MIME type text/plain. Any binary data in the file is uuencoded. This allows the file to be viewable by web browsers, so that anyone trying to copy the file would clearly notice the copyright statement at the top of the file. The contents of the file are as defined below. This file will be interpreted by a License Manager object.
.LPK Header | This header identifies the file type: "LPK License Package" |
Copyright text or other legal statement | "Legalese" to dissuade casual copying of .LPKs. |
LPK version GUID | In plain-text on a line by itself. This GUID is used to mark the beginning of the real license package data, and it is also used to identify the LPK file format version: "{5220cb21-c88d-11cf-b347-00aa00a28331}" |
Uuencoded(Base64) license package: | struct { UUID uuidLPKFile; // unique per LPK DWORD dwLicenses; // number of licenses in the file LICENSEPAIR aLicenses[]; // array of license pairs } LICENSEPACKAGE; struct { CLSID clsid; // clsid of object DWORD cchLic; // Number of characters in the license WCHAR ach[]; // License (saved as UNICODE characters) } LICENSEPAIR; |