LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I create a 64 bit dll that uses visa%3F

I have a dll created in Visual Studio 2008 that uses the visa32.lib and is called from LabView 2010 on a 32 bit XP machine. This works fine.

 

I now want to convert this to a 64 bit system. (Windows 7 64 bit and LabView 2010 64 bit). I converted my dll to x64 and changed the dependency to the visa64.lib. It builds without errors but when I try to run it in LabView I get an error code 15. I noticed in MAX that the visa32.dll is loaded so I re-installed visa 5.0.3 and paid attention to any options I may have missed when I installed it the first time. There weren’t any so visa 32 is still installed in MAX.

 

I also tried to build my x64 dll with the visa32.lib as it seems this is what LabView wants but got all kinds of un-resolved externals.

 

So, does anyone know any tricks to building 64 bit dlls that use visa and called from LabView?

Any help would be greatly appreciated!

0 Kudos
Message 1 of 5
(3,691 Views)

If you are working on a 64 bit OS and with 64 bit LabVIEW, the 32 bit VISA driver will no longer work.  It sounds like you need to uninstall the 32 bit version of VISA and install the 64 bit version, which can be found here:

 

https://www.ni.com/en/support/downloads/drivers/download.ni-visa.html

 

After completing the driver installation, rebuild your dlls.  This should resolve the issue.

Jayme W.
Applications Engineer
National Instruments
0 Kudos
Message 2 of 5
(3,675 Views)

I uninstalled visa and re-installed from the link provided but it still installed the visa32.dll in MAX. Also,  I didn't see any option to select 32 or 64 bit when I installed it. It says it's for both so is it supposed to detect the OS when it installs? .......... Thanks

0 Kudos
Message 3 of 5
(3,663 Views)

Most likely MAX is and remains a 32 Bit App, even on 64 Bit Windows. And as such it has to continue to accesses a 32 bit VISA installation. But why are you musing about MAX using 32 Bit VISA when you try to run a 64 Bit DLL under 64 Bit Windows? They should be able to run along each other just fine, with no other influence to each other than that you likely won't be able to open an interface in one, while the other has it already open, but that is independent on bitness and will happen even if both processes are the same bitness.

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 4 of 5
(3,659 Views)

Rolf,

The only way I could get the dll to compile was to use visa64.lib as a dependency. So I'm assuming it's looking for the visa64.dll on the runtime machine but it's only seeing visa32.dll. Of course, I don't know if this is the problem. It's just seemed unusual to me.

0 Kudos
Message 5 of 5
(3,652 Views)