mirror of
https://github.com/gnh1201/welsonjs.git
synced 2025-05-09 21:26:04 +00:00
Create winlibs.js
This commit is contained in:
parent
8033688c63
commit
9db9f4d4eb
23
lib/winlibs.js
Normal file
23
lib/winlibs.js
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
////////////////////////////////////////////////////////////////////////
|
||||||
|
// Windows Library API
|
||||||
|
////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
var SHELL = require("lib/shell");
|
||||||
|
|
||||||
|
exports.loadLibrary = function(LIB) {
|
||||||
|
return {
|
||||||
|
call: function(FN, args) {
|
||||||
|
var commandOptions = [];
|
||||||
|
|
||||||
|
if (typeof(FN) === "undefined") {
|
||||||
|
FN = "DllMain";
|
||||||
|
}
|
||||||
|
|
||||||
|
commandOptions.push("rundll32.exe");
|
||||||
|
commandOptions.push(LIB + ".dll," + FN);
|
||||||
|
commandOptions.push(args.join(' '));
|
||||||
|
|
||||||
|
return SHELL.exec(commandOptions.join(' '));
|
||||||
|
}
|
||||||
|
};
|
||||||
|
};
|
Loading…
Reference in New Issue
Block a user