How to call local DLL files in Electron application

I have a problem calling sample.dll files in my Electron application. I have files with .dll samples in my folder, the point is how to access my sample.dll file and how to call the sample.dll function and get the results. Any tutorials or steps to follow, please, sample code to run

+6
source share
2 answers

Calling a .dll in Electron is no different than calling one in a regular NodeJS, which means that you have two options: node-ffi or the native Node addon that references your .dll and provides a JavaScript API. If you decide to create your own Node addon, you need to create it to target Electron .

Here are some links that cover the following topics:

+12
source

Electron-Edge helps launch .NET in Node.js on Electron.
You can find it on github .
It explains how to use dll files in it. (Scroll down a bit to find "If you prefer to precompile your C # sources into a CLR assembly, you can reference the CLR assembly from your Node.js code ... '

+1
source

All Articles