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