i have an issue how to call sample .dll files into my Electron App. I have sample .dll files in my folder, the thing is how to access my sample.dll file and how to call my sample.dll function and gets results. Any tutorials or steps to follow please sample code to start
dll in Electron is no different to calling into one in plain NodeJS, which means you have two options, node-ffi or a native Node addon that links with your . dll and exposes a JavaScript API. If you decide to create a native Node addon you will need to build it to target Electron.
Add a file(s) to this Electron application using the “Drag and Drop” feature as well as by manually displaying the file explorer (system) dialog to select one or multiple files. Display system notification when a file(s) is added. On application relaunch, display the list of files.
As long as your main use of Electron is to create a 'native browser wrapper' for a web-app this is entirely possible. You'll probably have to step through your application and disable Electron specific functionality at multiple places.
Calling into a .dll
in Electron is no different to calling into one in plain NodeJS, which means you have two options, node-ffi or a native Node addon that links with your .dll
and exposes a JavaScript API. If you decide to create a native Node addon you will need to build it to target Electron.
Here are some links that cover these topics:
Electron-Edge helps to run .NET in Node.js on Electron.
You can find it on GitHub.
Here it is explained how to use dll files in it.(Scroll Down a little to find 'If you prefer to pre-compile your C# sources to a CLR assembly you can reference a CLR assembly from your Node.js code...'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With