无法在xulrunner 8.0及最新版本中使用js-ctypes.jsm
(我不是在构建扩展,而是在构建示例应用程序)
在 xulrunner 1.9.2 中,我能够使用:
Components.utils.import("resource://gre/modules/ctypes.jsm");
并在 Windows 上轻松地进行本机调用 (.dll)。我正在使用 gre(Gecko 运行时环境 1.9.2)执行我的 application.ini
,其中包含模块文件夹和 ctypes.jsm
。
在最新的 xulrunners 7.0、8.0 和 9.0 GRE 中,没有 modules
文件夹。我尝试使用 Xulrunner SDK。在 bin/modules 中存在 ctypes.jsm
。
但我不知道在 Components.utils.import("************");
中给出什么。 有人可以澄清我的问题吗?
(I am not building an extension I am building my sample app)
In xulrunner 1.9.2 I am able to use:
Components.utils.import("resource://gre/modules/ctypes.jsm");
and comfortably making a native call (.dll) on Windows. I am executing my application.ini
using gre (Gecko runtime environment 1.9.2) which had modules folder and ctypes.jsm
.
In latest xulrunners 7.0, 8.0 nad 9.0 GRE's there is no modules
folder. I tried to use Xulrunner SDK's. In that in bin/modules the ctypes.jsm
is present.
But I do not know what to give in Components.utils.import("**********");
.
Can someone clarify my question?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
最新版本的 Firefox、Thunderbird、SeaMonkey 和 XULrunner 使用
omni.ja(r)
而不是单独的资源。您应该会发现ctypes.jsm
存储在其中。不过,您仍然可以使用相同的resource:
URI 来访问它。 (例如 Firefox Sync 就是这样做的。)Recent versions of Firefox, Thunderbird, SeaMonkey and XULrunner use
omni.ja(r)
instead of separate resources. You should findctypes.jsm
stored inside. You can still use the sameresource:
URI to access it though. (Firefox Sync does this for instance.)