如何在扩展中调用npapi插件方法
How to call npapi plugin method in extension
我有一个使用c#的测试。dll文件,其中包含以下细节
Name : TestLibrary.dll
Namespace name : TestLibrary
Class Name : AddClass
Method name : add(accepts two parameters)
Language used : C#
我在manifest中给出了lugin path。Json如下
plugins : [{"path":"TestLibrary.dll", "public": true}]
var result = TestLibrary.AddClass.add(12,34)
但是它什么也没有返回给我。请帮我改正这个代码。Please provide me simple NPAPI plugin example with hello world program with NPAPI plugin in any example. I am confused with parameters / details / references need to be provided inside NPAPI plugin
你不能使用c#来创建一个NPAPI插件。您必须有一个c++库来导出以下入口点:
LIBRARY my_plugin.dll
EXPORTS
NP_GetEntryPoints @1
NP_Initialize @2
NP_Shutdown @3
这些入口点是NPAPI体系结构的核心。例如,参考以下答案一个简单的hello world NPAPI插件用于Google Chrome
NPAPI插件不添加实用程序类到你的JS命名空间,他们允许你实例化<object>
/<embed>
元素。你需要在HTML中实例化你的插件,然后调用该插件元素的方法。
相关文章:
- 从C++本机插件更新Vector3数组
- 使用CMake创建QML插件
- 不能在NPAPI插件中使用POCO计时器
- 在我的应用程序中使用NPAPI插件
- NPAPI:修改插件对象的 CSS 属性
- 我可以使用NPAPI在一个DLL中创建多个插件吗
- 使用授予的权限运行NPAPI插件(firebreath)
- 如何在扩展中调用npapi插件方法
- 支持Twain的Visual Studio c++ NPAPI插件
- 新手chrome插件开发人员需要帮助开始使用NPAPI
- Mac上的NPAPI插件-启动另一个进程
- 适用于Chrome的NPAPI插件无法通过NP_Initialize
- 如何将C++对象传递给NPAPI插件
- NPAPI插件-传递xulrunner组件(nsCOMptr)的实例
- 我可以添加外部DLL到npapi插件,应该安装在浏览器中
- 如何获得网站的url调用NPAPI插件
- 如何处理从浏览器打开的文件NPAPI插件
- 使用Firebreath为Chrome创建的NPAPI我可以从扩展而不是从HTML加载页面调用插件方法
- 如何使用npapi插件获得附加到http请求的postdata
- 调用NPAPI插件对象上的方法会重新生成插件