ActiveX Control packaging and publishing [certificate-free Publishing]

Source: Internet
Author: User
Recently, in order to solve a technical problem of ActiveX, VB was used as an ActiveX control, and there was no function at all,

Is to test the release and version Update Of ActiveX! After two days, I finally figured out some of the processes!

By the way, you should not forget it! Read an articleArticleDescribes how to use C # To develop ActiveX functions, but C # Can only

ManagedProgram. NET Framework can run only after it is installed on the client! So, I finally developed

Developed Using VB6 and VC ++ 6.

To develop, package, and publish ActiveX controls, follow these steps:

1. Create an ActiveX Control Project

2. Draw the ActiveX control operation interface and writeCode

3. Note: On the make page of the project's properties, there is a version number area, you need to write the current control's

Version number, which is closely related to automatic download! When your remote web browser checks the version number of the local control

Different from on the server, the browser automatically downloads the new control version from the server for installation.

Make sure to change the version number of the new control version! Otherwise, remote updates may fail.

4. Compile ActiveX Controls

ActiveX Control packaging steps:

This example uses the package tool that comes with Studio 6.0 as an example.

1. Select the currently selected VB ActiveX project for packaging.

2. Three options are available when package type is selected:

1) Standard Setup package

2) Internet package

3) Dependency File

Select the second one!

3. When file source is selected, three options are available:
1) include in this cab

2) download from Microsoft Web Site

3) download from alternate web site

The above options are for every related DLL and OCX contained in the program. Therefore, if you want to modify parameters, you need to set files one by one!

I suggest selecting the first item! Because some controls are updated from outside, problems such as certificates may occur,

This may cause your program to become unusable. Therefore, it is the most worry-free option to use local programs!

For other steps in the packaging process, use the default settings unless otherwise specified!

4. Create a directory under the root directory of the website where the control is published. It is called ActiveX. Put all the files in the packaged package directory.

Copy to the ActiveX directory.

5. Modify the HTM file of the test example after packaging:

After packaging, the tool automatically generates an HTM file with the same project name. The Code is as follows:

<HTML>
<Head>
<Title> webactivex. Cab </title>
</Head>
<Body>
<! -- If any of the controls on this page require licensing, you must
Create a license package file. Run lpk_tool.exe to create
Required LPK file. lpk_tool.exe can be found on the ActiveX SDK,
Http://www.microsoft.com/intdev/sdk/sdk.htm. If you have the visual
Basic 6.0 CD, it can also be found in the \ tools \ lpk_tool directory.

The following is an example of the Object Tag:

<Object classid = "CLSID: 5220cb21-c88d-11cf-b347-00aa00a28331">
<Param name = "lpkpath" value = "lpkfilename. LPK">
</Object>
-->

<Object ID = "activexdrive"
Classid = "CLSID: F68EC215-0F14-416F-B680-FF8C772A0B47"
Codebase = "webactivex. Cab # version = 1, 1, 0, 0">

To:

Codebase = "http: // 130.50.26.221/ActiveX/webactivex. Cab # version = 1, 1, 0, 0">
</Object>
</Body>
</Html>

Pay attention to the red part above.

Client iesettings:

1. Choose IE> Internet> Security> Internet to set the security level to low! Note that in "Custom Level,

Are there any restrictions on ActiveX!

2. If the firewall software is installed, pay attention to whether the software imposes any restrictions on HTTP access. If the software is completely released!

 

Last step: Hey, access the server that publishes ActiveX controls on another computer. It should have been successful!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.