Naveen Chandra Tiwari
Naveen Chandra Tiwari

Reputation: 5123

Error with ffi module node.js Uncaught Error: Dynamic Linking Error: Win32 error 193

I want to call a function, which is written in "C" DLL, from node.js JavaScript. I am using "ffi" module in node.js and electron. The function which I want to call is "int FDColor_GetSWVersion(char* softwareVersion)". I am using the below code:

  var libm = ffi.Library(__dirname + "\\viewmodels\\FDColor.dll", {
  'FDColor_GetSWVersion': [ 'int', ['string' ] ]
   });

But I am getting the error:

Uncaught Error: Dynamic Linking Error: Win32 error 193

Upvotes: 3

Views: 3755

Answers (2)

Jack Sue
Jack Sue

Reputation: 1

I chose the 64-bit DLL and loaded it successfully

Upvotes: 0

Lou Franco
Lou Franco

Reputation: 89192

It looks like that error means you have a 32/64 bit mismatch. You need to build the dll to match the loading process.

Upvotes: 3

Related Questions