I'm trying to control RFID reader on linux using Dotnet core 3
ReaderDynamicLib.dll is main controller file which is not my created dll file. It is manufacture provided sdk file runs on only 32bit I tried it in windows.
I created console application to send parameter to ReaderDynamicLib.dll
public static extern int SetAntenna(int hScanner, int m_antenna_sel, int Address);
like this runs fine on windows but in linux
An attempt was made to load program with an incorrect format
I assume linux don't have run as 32bit option
It's probably irrelevant now, but for future reference, the problem here is that the vendor dll was likely compiled to work on Windows platform (since you are able to run it on Windows). You cannot then DllImport the exact same library into a .NET program running on linux. A binary that is native-compiled to work on the Windows platform will not load on the linux platform. It will have to be recompiled targeting linux.",