npm install ffi
Error: The specified module could not be found.
npm rebuild
var ffi = require(‘ffi‘);
var Test = ffi.Library(‘user32.dll‘,{
‘MessageBoxA‘: [‘int‘,[‘int‘,‘string‘,‘string‘,‘int‘]]
});
Test.MessageBoxA(0,‘123‘,‘456‘,0);
原文:http://www.cnblogs.com/ahuo/p/6828179.html