Can I use anyCPU?
When I select anyCPU as a platform, I get a warning or an error!
When the computer starts Visual Studio, if I have selected anyCPU, the software will decide whether to use the 32bit or 64bit version of the DLL. Yes, anyCPU might work, but if I run the built application on another machine, with a different setup, it might not work.
(Selectable loading of the DLL might work, please check this external link for more information: https://stackoverflow.com/questions/108971/using-side-by-side-assemblies-to-load-the-x64-or-x32-version-of-a-dll)
Safest setup?
If I select x86 (WIN32) built application, it will run on both WIN32 and WIN64 machines.
Do I need x64?
If your application needs it, CANlib will work perfectly, but only on WIN64 machines. However, today (2019), the majority of Windows PCs are WIN64.
Microsoft Visual C++ and Kvaser.CanLib Redistributable
When installing your app on another machine (might not have Visual Studio installed), please remember to redistribute (and install) the “Microsoft Visual C++ Redistributable for Visual Studio 2019”. You will need to copy the Kvaser.CanLib.dll (x86 and/or x64) with your project executable. These dlls are not installed as part of the driver (they are part of KVASER CANlib SDK).
Thanks for reading this! If you have any questions or comments regarding this paper, please send a mail to [email protected].