07-03-2018 10:01 AM
I am extremely new to LabWindows 2017 and was handed this program (initially created in '98 I believe) that would constantly crash when the user attempted to load a specific .lib file.
I recompiled the program and unchecked the Enable LoadExternalModule box in Target Settings. This fixed the program crashing for some .lib files however for the others I receive an error Function LoadExternModule: (return value ==4).
I've noticed that the .lib files that load correctly do not have a .h file. The ones that are unable to load have a .h file. I tried to recompile the .lib and .dll of one of these libraries however this did not work. To me this has to be a compatibility issue because this program was made so long ago. Anyone have any insight? Thanks in advance
07-03-2018 12:28 PM
Error -4 means Invalid file format, but since that function is deprecated since CVI2010 I suggest you to replace LoadExternalModule with the WIN32 API LoadLibrary: see this page for reference.
As you can see in the help for the function, you can load DLLs with it but not libraries and object files.