NPAPI插件没有加载在chrome上 [英] NPAPI Plugin not loaded on chrome

查看:380
本文介绍了NPAPI插件没有加载在chrome上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个由dll和manifest.json文件组成的npapi插件。这个npapi DLL被检测为chrome上的插件,即它被列在about:插件页面上。但是,当我使用标签在示例html页面中调用此插件时,它表示插件无法加载。
任何想法为什么这个插件无法加载铬。



谢谢

解决方案

肯定地说,但我猜想这是两件事之一:


  1. 您的插件可能具有isn没有被发现。如果您要链接到需要.DLL文件的另一个库(或者如果您使用/ MD作为CRT的DLL版本),并且在浏览器尝试加载插件DLL时无法找到DLL,那么您的插件将默默无法加载


  2. 您的插件DLL可能正在加载,但然后抛出异常,错误地处理事件等,以便浏览器决定它不是一个有效的插件。最有可能的情况并非如此,因为Chrome通常会将这种情况报告为崩溃,而不是缺少的插件。不过,您可以通过使用命令行参数--plugin-startup-dialog启动Chrome,这会在加载插件DLL之前弹出一个包含pid的对话框。然后你可以附加一个调试器并告诉它继续。


这两个中,第一个是迄今为止最我看到的共同问题。您可以通过获取Dependency Walker(depends.exe)并就地打开DLL查看缺少的内容来排除故障。如果您发现ieshims.dll忽略它 - 它总是认为缺失,但在浏览器运行时发现它。



有关调试插件的更多提示可以在<一个href =http://npapi.com/x/MYAG =nofollow> http://npapi.com/x/MYAG ,当然如果你还没有推荐我的话使用 FireBreath 框架来解决您可能遇到的大多数NPAPI问题。



祝你好运!

I have a npapi plugin composed of a dll and manifest.json file. This npapi dll is detected as plugin on chrome ie it is listed on about:plugins page. However, when I invoke this plugin in sample html page using tag, it says 'Plugin failed to load'. Any ideas why this plugin fails to load in chrome.

Thanks

解决方案

With the information you have provided it is impossible to say for sure, but I would guess it is one of two things:

  1. Your plugin may have an external dependency that isn't being found. If you are linking to another library that requires a .DLL file (or if you're using /MD for the DLL version of the CRT) and the DLL can't be found when the browser tries to load the plugin DLL then your plugin will silently fail to load

  2. Your plugin DLL may be loading but then throwing an exception, incorrectly handling things, etc in such a way that the browser decides that it isn't a valid plugin. Most likely this isn't the case, since Chrome usually reports something like that as a crash, not a missing plugin. You can verify this, though, by starting Chrome with the command line argument --plugin-startup-dialog, which will cause a dialog with the pid to pop up before the plugin DLL is loaded. You can then attach a debugger and tell it to continue.

OF those two, the first is by far the most common issue I see. You can troubleshoot it by getting Dependency Walker (depends.exe) and opening the DLL in-place to see what is missing. If you see ieshims.dll ignore it -- it always thinks that's missing, but finds it when the browser is running.

More tips on debugging plugins can be found at http://npapi.com/x/MYAG and of course if you're not already I'd recommend using the FireBreath framework which solves most NPAPI problems you may run into for you.

Good luck!

这篇关于NPAPI插件没有加载在chrome上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆