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?