04-12-2012 01:57 PM
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!
04-13-2012
05:00 PM
- last edited on
06-17-2024
09:16 AM
by
Content Cleaner
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.
04-16-2012 01:18 PM
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
04-16-2012 01:39 PM - edited 04-16-2012 01:40 PM
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.
04-16-2012 02:23 PM
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.