本文介绍了准备使用的NPAPI插件来启动外部应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要从Google Chrome扩展程序启动外部应用程序。我需要从JavaScript传递一些参数,等到外部应用程序完成,然后在javascript中使用它的输出。



我做了一些阅读,这应该可以使用一个NPAPI插件(我只关心Windows到目前为止)。

由于多年来我的C / C ++非常生疏,我的需求非常简单,我想知道是否有人知道一个随时可用的NPAPI DLL我需要的一件事:用几个参数启动一个EXE并返回它的输出?



我尝试了谷歌当然,但没有找到任何东西。非常感谢。

解决方案

使用Firebreath在C ++中编写这样一个插件应该相当容易。从头开始编写NPAPI插件可能会非常棘手,但幸运的是,Firebreath将大部分细节抽象出来并使其更容易。另外,如果您基于插件Firebreath除了Windows上的NPAPI之外,几乎可以免费获得对Mac / Linux上的NPAPI和Windows上的ActiveX的支持。


I need to launch an external application from a Google Chrome extension. I need to pass a few parameters from javascript, wait until the external application is done and then use its output in javascript.

I did some reading and this should be possible using an NPAPI plugin (I only care about Windows so far).

Since my C/C++ got very rusty over the years and my requirements are quite simple I was wondering if somebody knows about a ready-to-use NPAPI DLL that does just the one thing I need: Launch an EXE with several parameters and return its output?

I tried Google of course, but didn't find anything. Thanks a lot.

解决方案

It should be rather easy to write such a plugin in C++ with Firebreath. Writing a NPAPI plugin from scratch can be tricky, but luckily Firebreath abstracts away most of the details and makes it much easier.

As a plus, if you base the plugin on Firebreath, in addition to NPAPI on Windows you pretty much get free support for NPAPI on Mac/Linux and ActiveX on Windows.

http://www.firebreath.org

这篇关于准备使用的NPAPI插件来启动外部应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-25 23:11