I have a windows c++ DLL. It provides some functions like add(1,2). But I don't have the source code for this DLL, is it possible call functions in this DLL through nodejs, I mean, through web side and http. If it possible, what should I do?
To call a function, you can either pass its name and arguments to User. callFunction() or call the function as if it was a method on the User.
Yes, Node. js has a great portion of it written in C/C++ and a lot of its modules are actually implemented in C/C++. Just like any other javascript project out there, Node. js internally has a collection of dependencies that it uses to actually execute your code.
Did you check out the ffi nodejs library? https://github.com/node-ffi/node-ffi
var ffi = require('ffi'); var libm = ffi.Library('libm', { 'ceil': [ 'double', [ 'double' ] ] }); libm.ceil(1.5); // 2
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With