LabWindows™/CVI Application Failed to Load DLL in the Deployment PC

Updated Nov 2, 2021

Reported In

Software

  • LabWindows/CVI

Issue Details

I am using the LoadLibrary() function to load a 3rd party DLL using LabWindows/CVI. The application can load the DLL correctly on the development pc but not on the deployment pc.

Solution

If you are able to load the DLL in the development pc but not in the deployment pc please follow these troubleshooting steps:
  • If the DLL has dependencies, make sure that those dependencies are present on the target pc in a location where the DLL expects them (in case there are hardcoded paths those should be followed on the target pc). Load your DLL into a dependency checker program that will make sure that you are not missing any dependencies. You can check DLL dependencies using the following open source program on GitHub: Dependencies - An open-source modern Dependency Walker.
  • Contact the developer of the DLL and ask whether there are dependencies that require the installation of additional software.
  • When loading the DLL, provide the full path to the DLL to eliminate possible errors coming from DLL not being in the current directory or in one of the predefined search paths.
  • Make sure that the DLL installed on the target pc has the same bitness as the LabWindows/CVI application.
  • ​If the file path is correct, load your DLL into a dependency checker program that will make sure that you are not missing any dependencies.
  • Ensure that your Windows account has permission to read the file. 
  • Make sure that no other programs like Source Code Control or AntiVirus software are blocking the DLL.
  • Check the LabWindows/CVI documentation on Rules for Using DLL Files .