node-ffi / node-ffi

Node.js Foreign Function Interface
MIT License
4.26k stars 414 forks source link

Error: Dynamic Linking Error: Win32 error 126 #507

Open FanShiDe opened 6 years ago

FanShiDe commented 6 years ago

The Ewallet.dll file depends on lib-usb. dll. How can I use ffi.Library to introduce these two dlls?


ffi.Library(
  path.resolve(
    process.env.NODE_CONFIG_DIR,
     './EWallet'
  ),
  {/**/}
)
nightshadecf commented 5 years ago

you can try process.chdir to change cwd to where that has both dlls. That fixes it for me