Access Violation 0xC0000005 When Deploying a LabVIEW Executable

Updated Aug 20, 2018

Reported In

Software

  • LabVIEW
  • LabVIEW Application Builder Module

Issue Details


My program uses Call Library Function Nodes or ActiveX calls and runs as expected in the LabVIEW Development Environment. When I try to run my program as an executable, I receive:

​Access Violation Error 0xC0000005

​How do I resolve this?

Solution

To mitigate this behavior, you might need to change the file path to the DLL or ActiveX object you are calling.

 For example, if you're calling User32.dll, the file path will normally be:
C:\Windows\System32\user32.dll
This must be manually changed to:
%windir%\System32\user32.dll

Using the %windir% directory allows the DLLs and ActiveX objects to be accessed when running the application as an executable, as well as when running within the LabVIEW Development Environment.


 

Additional Information

This error can occur for a number of reasons, including when calling external code from Windows DLLs using the Call Library Function Node function.  Windows restricts access to certain domains and folders located directly on the C Drive.

WAS THIS ARTICLE HELPFUL?

Not Helpful