System Error 998 While Loading LabVIEW DLL

Updated Oct 3, 2023

Reported In

Software

  • LabVIEW

Programming Language

  • C++

Issue Details

  • I created a DLL in LabVIEW to use it in Visual C++. When loading the DLL, LabVIEW reports System error 998. How can I troubleshoot this?
  • I installed LabVIEW Run-Time Engine on the computer with Visual C++ and try to call a DLL. 
    The Visual C++ application compiles correctly, but it gives System Error 998 when linking the LabVIEW DLL. What is the problem?
  • I have created a LabVIEW executable and have installed the correct version of LabVIEW Run-Time. When I run my application, I see the error below. How can I fix this?
System error 998 while loading the LabVIEW Run-Time Engine (C:\Program Files\National Instruments\Shared\LabVIEW Run-Time\<version>\lvrt.dll).
<Application name> requires a version <version> (or compatible) LabVIEW Run-Time Engine. Please contact the vendor of <application name> to correct this problem.


system error 998.png

 

Solution

This error is caused by Windows being unable to load or unload the DLL as required. Follow the relevant section below to troubleshoot this.
 


For DLLs created in Visual C++

  1. Call the LabVIEW DLL using the LoadLibrary and GetProcAddress to dynamically load the DLL and call the function.
  2. Then, use the Visual C++ delayload feature as shown below, where sampleDLL.dll is the name of the LabVIEW DLL. Refer to [External] Linker support for delay-loaded DLLs for more information. Note: When statically linking with a DLL, the linker provides options to delay load the DLL until the program calls a function in that DLL.
/delayload:"sampleDLL.dll" 



For the LabVIEW Run-Time Engine DLL

  1. Ensure that a compatible version of LabVIEW Run-Time has been installed.
  2. If this error occurs on a deployment PC, verify whether the same error occurs on the development PC.
    • If the error is not present on the development PC, this signifies that there is a difference between the development and deployment PC.
    • Review the Build Specifications of your LabVIEW application and ensure that all required dependencies have been included.
  3. Consider creating a LabVIEW Installer that includes your application as well as the required version of Run-Time.
  4. If the PC is using anti-virus software, verify whether the error persists when the anti-virus is disabled.
    • It is possible that the anti-virus is preventing Windows from loading the necessary DLLs.
  5. Check whether the error persists when running a different LabVIEW application.
    • This will identify whether the problem is with the application itself.
  6. Check if the error occurs on other deployment PCs.
    • If other PCs can run the application without issues, this indicates that there is a software issue on the original deployment PC.
    • Create a MAX Report of the working and non-working deployment PCs to compare software sets, and ensure that both have the same versions of NI software installed.
  7. The installed version of LabVIEW Run-Time may be corrupted. To mitigate this possibility, uninstall and reinstall LabVIEW Run-Time.

 

Additional Information