Reputation: 5123
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
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