Calling a .dll function from a html page that runs on chrome and firefox

怎甘沉沦 提交于 2019-11-27 02:56:11

问题


I have a dll written in c++. now i need to call the functions in the dll from a html page.

I have done this by calling the dll in vbscript (Activex) so that i can run the only in IE.

Now i need to run this on Chrome as well as Firefox.

What i have to do, whether i have to write in javascript simply or need to develop any extensions for that ?

can anyone give a solution with a simple demo for this?

Thanks in advance.


回答1:


You have no chance until you create non-portable extension for all browsers.

Firefox allows you to create XPI extension aka "addon"

Chrome has extensions

There is no cross platform solution for DLL files, however, you can try to create flash or java applet, which will interact with your DLL, it can be "portable" enough for you.




回答2:


You can write an NPAPI plugin for both Mozilla and Chrome. Or you can use Firebreath plugin, but there may arise some dependency issue.




回答3:


Thanks for answers friends.

I got another solution. I wrote signed applets to call dll that runs from a html or any web application. It almost run on all browsers.

Here is the link for sample

http://www.javaworld.com/javaworld/jw-10-1998/jw-10-apptowin32.html



来源:https://stackoverflow.com/questions/9430619/calling-a-dll-function-from-a-html-page-that-runs-on-chrome-and-firefox

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!