search

Home  >  Q&A  >  body text

node.js - nodejs如何调用dll?

nodejs如何调用dll?网上找不到啊

伊谢尔伦伊谢尔伦2872 days ago650

reply all(3)I'll reply

  • 迷茫

    迷茫2017-04-17 11:19:17

    This is easy to find. If you are familiar with FFI (Foreign Function Interface), you can know what keywords you can search for.
    The ffi library is available in many languages, python lua ruby
    For node, search on npm and you will see this
    https://www.npmjs.org/package/ffi
    There are examples in the description.

    reply
    0
  • PHP中文网

    PHP中文网2017-04-17 11:19:17

    I haven’t encountered such a demand, but you can find ideas online, just Google it.

    Two connections for your reference

    Edge.js: .NET and Node.js in-process

    Integrating Node.js with a C# DLL

    reply
    0
  • 迷茫

    迷茫2017-04-17 11:19:17

    There are two main solutions. One is to load the dll by writing a Node Addon. The main method is LoadLibrary of C++, https://nodejs.org/api/addons... The other is to use node-ffi (https://github.com/node-ffi/n... However, this method requires environment dependencies.

    reply
    0
  • Cancelreply