nodejs:How to call c++ DLL function through nodejs

2019-04-04 19:04发布

问题:

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?

回答1:

Yes, there are some prominent solutions out there for using Nodejs with native/C++.

Checkout this node-gyp tutorial: http://www.benfarrell.com/2013/01/03/c-and-node-js-an-unholy-combination-but-oh-so-right/

Or Node-ffi: https://github.com/node-ffi/node-ffi



标签: c++ node.js dll