Calling a 32-Bit DLL from 64-Bit LabVIEW and Vice-Versa.

Updated Mar 4, 2019

Reported In

Software

  • LabVIEW

Issue Details

When I try to select a 32-bit DLL in a Call Library Function node in 64-bit LabVIEW, I get a dialog stating:
The library selected is not valid for the current platform. For example, you are running 64-bit LabVIEW and the library might be a 32-bit library.
 


OR:
 
When I try to select a 64-bit DLL in a Call Library Function node in 32-bit LabVIEW, I get a dialog stating:
The library selected is not valid for the current platform. For example, you are running 32-bit LabVIEW and the library might be a 64-bit library.

 
Why am I seeing these error? Can I call a 32-bit DLL from 64-bit LabVIEW? Can I call a 64-bit DLL from 32-bit LabVIEW?

Solution

You cannot call a 32-bit DLL from 64-bit LabVIEW, or vice versa. This is a limitation of 64-bit Windows, which does not support mixed 64-bit/32-bit processes.

1. If you are trying to use a 32-bit DLL in 64-bit LabVIEW:

The recommended solution is to recompile the DLL from the source code for a 64-bit target architecture. Alternatively, you can load the DLL in a 32-bit LabVIEW VI or EXE and communicate between 32-bit LabVIEW and 64-bit LabVIEW using Shared Variables or other networking technologies.

2. If you are trying to use a 64-bit DLL in 32-bit LabVIEW:

The recommended solution is to recompile the DLL from the source code for a 32-bit target architecture. Alternatively, you can load the DLL in a 64-bit LabVIEW VI or EXE and communicate between 64-bit LabVIEW and 32-bit LabVIEW using Shared Variables or other networking technologies.

Additional Information

You can install both the 32-bit and 64-bit versions of LabVIEW on the same machine.

WAS THIS ARTICLE HELPFUL?

Not Helpful