关于ActiveX问题(70分)

  • 主题发起人 主题发起人 dependmyself
  • 开始时间 开始时间
D

dependmyself

Unregistered / Unconfirmed
GUEST, unregistred user!
我想问一下,我新建立了一个ActiveX控件,在建立的时候要求加入"许可信息"。写好以后
编译成ocx以后来试用,说我没有"许可信息"。哈哈,说来真是好玩,自己的东西却没有"许可信息"
不知要如何解决?

请各位高手释疑,谢谢

awaitlq@163.net
 
*.LIC

Licensing an ActiveX control consists of providing a license key at design-time and supporting the creation of licenses dynamically, when the control is created at runtime.
To provide design-time licenses, the ActiveX wizard creates a key for the control that is stored in a file with the same name as the project and with the LIC extension. The user of the control must have a copy of the LIC file to open the control in a development environment. Each control in the project that has Make Control Licensed checked will have a separate key entry in the LIC file.

To support the creation of runtime licenses, the license is generated by querying the control for the license (at design time), storing it, and then passing the license to the control when it is created in the context of an EXE. When the runtime license is passed to the control, the design time license is no longer required.
Runtime licenses for the Internet Explorer requires an extra level of indirection because users can view HTML source code for any Web page, and because an ActiveX control is copied to the user抯 computer before it is displayed. To create runtime licenses for controls used in IE, you must first generate a license package file (LPK file) and embed this file in the HTML page that contains the control.

The LPK file is essentially an array of ActiveX control CLSIDs and license keys.

Note: To generate the LPK file, use the utility, LPK_TOOL.EXE, which you can download from the Microsoft Web site (www.microsoft.com).

To embed the LPK file in a Web page, use the HTML objects, <OBJECT> and <PARAM> as follows:

<OBJECT CLASSID="clsid:6980CB99-f75D-84cf-B254-55CA55A69452">

<PARAM NAME="LPKPath" VALUE="ctrllic.lpk">
</OBJECT>

The CLSID identifies the object as a license package and PARAM specifies the relative location of the license package file with respect to the HTML page.
When IE tries to display the Web page containing the control, it parses the LPK file, extracts the license key, and if the license key matches the control抯 license, it renders the control on the page. If more than one LPK is included in a Web page, IE ignores all but the first.
For more information, search for Licensing ActiveX Controls on the Microsoft Web site.
 
有个工具可对自已编的OCX控件进行认证
 
后退
顶部