mirror of
https://github.com/gnh1201/welsonjs.git
synced 2025-02-06 23:14: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) {
|
exports.loadLibrary = function(LIB) {
|
||||||
return {
|
return {
|
||||||
call: function(FN, args) {
|
call: function(FN, args) {
|
||||||
var commandOptions = [];
|
var cmd = [
|
||||||
|
"rundll32.exe"
|
||||||
|
];
|
||||||
if (typeof(FN) === "undefined") {
|
if (typeof(FN) === "undefined") {
|
||||||
FN = "DllMain";
|
FN = "DllMain";
|
||||||
}
|
}
|
||||||
|
cmd.push(LIB + ".dll," + FN);
|
||||||
commandOptions.push("rundll32.exe");
|
|
||||||
commandOptions.push(LIB + ".dll," + FN);
|
|
||||||
if (typeof(args) !== "undefined") {
|
if (typeof(args) !== "undefined") {
|
||||||
commandOptions.push("\"" + args.join("\" \"") + "\"");
|
cmd = cmd.concat(args);
|
||||||
}
|
}
|
||||||
|
return SHELL.exec(cmd);
|
||||||
return SHELL.exec(commandOptions.join(' '));
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue
Block a user