Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uncaught Error: A dynamic link library (DLL) initialization routine failed. #1

Open
ravishelke536 opened this issue Jan 6, 2022 · 2 comments

Comments

@ravishelke536
Copy link

Hi, I am using electron-node-ffi to load windows compiled basic dll . I am getting below error when I run app using npm start using electornJS. Please suggest if i doing something wrong.

var ffi = require('ffi-napi')

var libm = ffi.Library('TestDll.dll', {
'Addition': [ 'int', [ 'int', 'int'] ]
})
let result = libm.Addition(10,10)

Uncaught Error: A dynamic link library (DLL) initialization routine failed.
\?\C:\Users\Administrator\Desktop\electron-fcm-demo-master\node_modules\ref-napi\prebuilds\win32-x64\electron.napi.node
at process.module.(anonymous function) [as dlopen] (ELECTRON_ASAR.js:172:20)
at Object.Module._extensions..node (module.js:598:18)
at Object.module.(anonymous function) [as .node] (ELECTRON_ASAR.js:172:20)
at Module.load (module.js:503:32)
at tryModuleLoad (module.js:466:12)
at Function.Module._load (module.js:458:3)
at Module.require (module.js:513:17)
at require (internal/module.js:11:18)
at load (C:\Users\Administrator\Desktop\electron-fcm-demo-master\node_modules\node-gyp-build\index.js:21:10)
at Object. (C:\Users\Administrator\Desktop\electron-fcm-demo-master\node_modules\ref-napi\lib\ref.js:8:53)

@hexingcheng
Copy link

Is this problem solved?

@raviSussol
Copy link
Owner

@ravishelke536 can you post an example repository replicating your issue. Maybe refer: https://github.com/raviSussol/electron-webpack-native-module-example for an example.

@hexingcheng can you also try with above link for a test. See if that helps you to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants