Update winlibs.js

This commit is contained in:
Namhyeon Go 2020-07-26 20:46:46 +09:00
parent a2c475a89a
commit aaacd28dbe

View File

@ -11,19 +11,17 @@ var SHELL = require("lib/shell");
exports.loadLibrary = function(LIB) {
return {
call: function(FN, args) {
var commandOptions = [];
var cmd = [
"rundll32.exe"
];
if (typeof(FN) === "undefined") {
FN = "DllMain";
}
commandOptions.push("rundll32.exe");
commandOptions.push(LIB + ".dll," + FN);
cmd.push(LIB + ".dll," + FN);
if (typeof(args) !== "undefined") {
commandOptions.push("\"" + args.join("\" \"") + "\"");
cmd = cmd.concat(args);
}
return SHELL.exec(commandOptions.join(' '));
return SHELL.exec(cmd);
}
};
};