【问题标题】:Unable to use js-ctypes.jsm in xulrunner 8.0 and latest versions无法在 xulrunner 8.0 和最新版本中使用 js-ctypes.jsm
【发布时间】:2011-12-27 21:26:37
【问题描述】:

(我不是在构建扩展程序而是在构建我的示例应用程序)
在 xulrunner 1.9.2 我可以使用:

Components.utils.import("resource://gre/modules/ctypes.jsm");  

在 Windows 上轻松地进行本机调用 (.dll)。我正在使用 gre(Gecko 运行时环境 1.9.2)执行我的 application.ini,其中包含 modules 文件夹和 ctypes.jsm

在最新的 xulrunners 7.0、8.0 和 9.0 GRE 中没有 modules 文件夹。我尝试使用 Xulrunner SDK。在 bin/modules 中,ctypes.jsm 存在。

但我不知道在Components.utils.import("**********"); 中提供什么。 有人可以澄清我的问题吗?

【问题讨论】:

    标签: xulrunner gecko jsctypes


    【解决方案1】:

    最新版本的 Firefox、Thunderbird、SeaMonkey 和 XULrunner 使用 omni.ja(r) 而不是单独的资源。你应该会发现ctypes.jsm 存储在里面。您仍然可以使用相同的 resource: URI 来访问它。 (例如,Firefox Sync 就是这样做的。)

    【讨论】:

    • 非常感谢,我找到了。
    猜你喜欢
    • 2019-08-27
    • 2022-06-14
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2023-03-23
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多