ActiveX Control for Hosting Netscape Plug-ins in IE

  • Revision slug: ActiveX_Control_for_Hosting_Netscape_Plug-ins_in_IE
  • Revision title: ActiveX Control for Hosting Netscape Plug-ins in IE
  • Revision id: 186600
  • Created:
  • Creator: NvhD4a
  • Is current revision? No
  • Comment

Revision Content

Introduction

Microsoft has removed support for Netscape plug-ins from IE 5.5 SP 2 and beyond. If you are a plug-in author, you may find this project saves you a lot of work!

This page describes a control that implements the NP API and hosts most Netscape-compatible plug-ins. Now you can use your plug-ins in any recent version of IE or in any other ActiveX container for that matter. The control itself is implemented in a DLL called pluginhostctrl.dll which is standalone from the rest of the Mozilla project.

If you're wondering how Microsoft used to support the NP API, look for a file called plugin.ocx in your Windows system directory. This 100k ActiveX control contains the entire NP API implementation and probably worked much like pluginhostctrl.dll does now.

The sections below tell you how to fetch, build and use the pluginhostctrl.dll .

Get the source

You need CVS to get the source code. Assuming you have CVS somewhere in your path, type this from a command prompt:

C:\> set CVSROOT=:pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot
C:\> set HOME=\TEMP
C:\> cvs login
(Logging in to anonymous@cvs-mirror.mozilla.org)
CVS password: anonymous
C:\> cvs -z3 co mozilla/embedding/browser/activex/src/pluginhostctrl

This fetches the source for the control into mozilla\embedding\browser\activex\src\pluginhostctrl.

You can also see the code online.

Build it

It is quite simple to build the control

  1. Locate the pluginhostctrl directory:
  2. Open pluginhostctrl.dsp
  3. Build "Win32 Debug" or another target
  4. Open some of the test files under pluginhostctrl\tests in Internet Explorer to verify the control has built and registered correctly.

The control currently reads plug-ins from your most current Netscape 4.x and IE installations. There is no support for Mozilla or NS 6.x yet.

A note to developers

If you intend to modify this control IN ANY WAY then you MUST also change the CLSID from {DBB2DE32-61F1-4F7F-BEB8-A37F5BC24EE2} to something else and any other GUIDs this control relies upon (IID, LIBIDs etc). This is necessary so that your control may coexist with the generic version and any other versions that other plug-ins vendors may have installed.

It is advisable to rename the control and not to install somewhere like the Windows directory where it is likely to be overridden.

Use a tool such as guidgen.exe or uuidgen.exe to create the new GUIDs.

Package it

There is a subdirectory named cab/ which contains a script and a README.txt for producing your own signed CAB files.

Manual installation

Assuming you have the precompiled pluginhostctrl.dll and wish to install it on a machine, you must register it either through an install script or manually:

regsvr32 pluginhostctrl.dll

You must have administrator privileges to install a new control on operating systems such as Windows NT, 2000

Revision Source

<h2 name="Introduction">Introduction</h2>
<p>Microsoft has removed support for Netscape plug-ins from IE 5.5 SP 2 and beyond. If you are a plug-in author, you may find this project saves you a lot of work!
</p><p>This page describes a control that implements the NP API and hosts most Netscape-compatible plug-ins. Now you can use your plug-ins in any recent version of IE or in any other ActiveX container for that matter. The control itself is implemented in a DLL called pluginhostctrl.dll which is standalone from the rest of the Mozilla project. 
</p><p>If you're wondering how Microsoft used to support the NP API, look for a file called plugin.ocx in your Windows system directory. This 100k ActiveX control contains the entire NP API implementation and probably worked much like pluginhostctrl.dll does now.
</p><p>The sections below tell you how to fetch, build and use the pluginhostctrl.dll .
</p>
<h2 name="Get_the_source">Get the source</h2>
<p>You need  CVS to get the source code. Assuming you have CVS somewhere in your path, type this from a command prompt:
</p>
<pre>C:\&gt; set CVSROOT=:pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot
C:\&gt; set HOME=\TEMP
C:\&gt; cvs login
(Logging in to anonymous@cvs-mirror.mozilla.org)
CVS password: anonymous
C:\&gt; cvs -z3 co mozilla/embedding/browser/activex/src/pluginhostctrl
</pre>
<p>This fetches the source for the control into mozilla\embedding\browser\activex\src\pluginhostctrl. 
</p><p>You can also see the code <a class="external" href="http://lxr.mozilla.org/seamonkey/source/embedding/browser/activex/src/pluginhostctrl/">online</a>.
</p>
<h2 name="Build_it">Build it</h2>
<p>It is quite simple to build the control
</p>
<ol><li> Locate the pluginhostctrl directory:
</li><li> Open pluginhostctrl.dsp
</li><li> Build "Win32 Debug" or another target
</li><li> Open some of the test files under pluginhostctrl\tests in Internet Explorer to verify the control has built and registered correctly.
</li></ol>
<p>The control currently reads plug-ins from your most current Netscape 4.x and IE installations. There is no support for Mozilla or NS 6.x yet.
</p>
<h2 name="A_note_to_developers">A note to developers</h2>
<p>If you intend to modify this control IN ANY WAY then you MUST also change the CLSID from {DBB2DE32-61F1-4F7F-BEB8-A37F5BC24EE2} to something else and any other GUIDs this control relies upon (IID, LIBIDs etc). This is necessary so that your control may coexist with the generic version and any other versions that other plug-ins vendors may have installed.
</p><p>It is advisable to rename the control and not to install somewhere like the Windows directory where it is likely to be overridden.
</p><p>Use a tool such as guidgen.exe or uuidgen.exe to create the new GUIDs.
</p>
<h2 name="Package_it">Package it</h2>
<p>There is a subdirectory named cab/ which contains a script and a README.txt for producing your own signed CAB files.
</p>
<h2 name="Manual_installation">Manual installation</h2>
<p>Assuming you have the precompiled pluginhostctrl.dll and wish to install it on a machine, you must register it either through an install script or manually:
</p>
    <pre>regsvr32 pluginhostctrl.dll</pre>
<p>You must have administrator privileges to install a new control on operating systems such as Windows NT, 2000
</p>
Revert to this revision