mirror of
https://github.com/gnh1201/welsonjs.git
synced 2025-02-06 15:04:58 +00:00
Update winlibs.js
This commit is contained in:
parent
a2c475a89a
commit
aaacd28dbe
|
@ -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);
|
||||
}
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue
Block a user