本文介绍了如何将ActiveX控件转换为NPAPI插件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个ActiveX控件,用于设计
*搜索附近的无线网络
*创建无线访问点
*管理网络适配器

I have an ActiveX control which is designed to* Search for nearby wireless networks* Create a wireless access point* Manage network adapters

我希望该插件在Google Chrome / Firefox中运行。在IE中;我可以使用以下代码嵌入:

I would like this plugin to work in Google Chrome/Firefox. In IE; I can use the following code to embed:

<object classid="clsid:33FC4347-8118-4DB5-BFBE-8FCF2C96A997" width="32" height="32" id="thectrl"></object>

,然后按如下方式创建无线网络(使用JavaScript):
thectrl.createNetwork( test,0,null, NONE,3);
ActiveX有一个IDL文件,并以OCX格式输出。如何将其变成Google Chrome / Firefox的插件?

and I create a wireless network as follows (in JavaScript):thectrl.createNetwork("test",0,null,"NONE",3);The ActiveX has an IDL file, and outputs to OCX format. How do I turn this into a plugin for Google Chrome/Firefox?

推荐答案

如果要重写它以支持NPAPI,一种简单的方法是使用框架。它为您提供了插件体系结构的抽象,是跨平台的,并允许您从一个来源基础上支持NPAPI和ActiveX。

If you want to rewrite it to support NPAPI, an easy way is to use the FireBreath framework. It gives you an abstraction over the plugin architectures, is cross-platform and allows you to support NPAPI and ActiveX from one source base.

但是我还是有偏见,所以如果您想手动进行操作,则可以从以下几个起点入手:

But then again i am biased, so if you want to do it manually instead, here are some starting points:





  • a three-part NPAPI tutorial
  • MDC plugin section
  • The "Hello World" of NPAPI plugins

这篇关于如何将ActiveX控件转换为NPAPI插件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-28 05:15