最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - failed to load native module ("Ultralight.dll") via require() in Duktape - Stack Overflow

programmeradmin1浏览0评论

I have a 3rd party program that allows scripting via JavaScript (JS) using the Duktape JS engine. I am attempting to load the Ultralight DLL module through Duktape in order to call certain functions the DLL brings that Duktape doesn't have.

const ultralight = require("Ultralight.dll");

ultralight.init();

// Initialize Ultralight UI
const app = new ultralight.App();
const window = app.createWindow(800, 600, {
    title: "Tracker",
    transparent: true,
    resizable: true,
    alwaysOnTop: true
});
const view = window.createView(800, 600);
view.loadURL("file:///usr/interface.html"); // Update with the actual UI file
window.setRootView(view);
app.run();

Everything looks like it would be fine but this is the error I keep getting:

    Error: failed to load native module ("Ultralight.dll")
    at [anon] (UserInterface\Debugger\ScriptAPI\ScriptAPI.cpp:648) internal
    at [anon] () native strict preventsyield
    at require () native strict preventsyield
    at global (trackerv2.js:31) strict preventsyield

Would anyone be able to tell me why this is happening? Is it because I cannot use Ultralight with Duktape?

发布评论

评论列表(0)

  1. 暂无评论