Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/80.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Firefox addon 如何在Firefox(Windows)上使用附加组件和js ctypes调用我的代码(dll文件)_Firefox Addon_Firefox Addon Sdk_Jsctypes - Fatal编程技术网

Firefox addon 如何在Firefox(Windows)上使用附加组件和js ctypes调用我的代码(dll文件)

Firefox addon 如何在Firefox(Windows)上使用附加组件和js ctypes调用我的代码(dll文件),firefox-addon,firefox-addon-sdk,jsctypes,Firefox Addon,Firefox Addon Sdk,Jsctypes,我运行了代码,但遇到以下错误: 1423705078419 Services.HealthReport.HealthReporter WARN Saved state file does not exist. 1423705078420 Services.HealthReport.HealthReporter WARN No prefs data found. ReferenceError: require is not defined 我的代码: var {C

我运行了代码,但遇到以下错误:

1423705078419   Services.HealthReport.HealthReporter    WARN    Saved state file does not exist.
1423705078420   Services.HealthReport.HealthReporter    WARN    No prefs data found.
ReferenceError: require is not defined
我的代码:

var {Cu} = require("chrome");
var {ctypes} = Cu.import("resource://gre/modules/ctypes.jsm", null);
lib = ctypes.open("C:\\gmc\\posinf.dll");

您是否从firefox插件sdk运行此代码?还是从引导插件?如果来自引导,则没有定义
require
函数

var {interfaces: Ci, utils: Cu, classes: Cc} = Components;
Cu.import('resource://gre/modules/ctypes.jsm');
var lib = ctypes.open('C:\\gmc\\posinf.dll');

你弄明白了吗?:)