12-29-2011 05:42 PM
Hi
I am using VB6 referencing visa32.dll version 4.6.0.49152.
when I check for the definition of "VI_FIND_BUFLEN" it shows
Const VI_FIND_BUFLEN = 256 (&H100)
Member of visa.VISAOtherDefinitions
The program compiles and every thing works fine.
But I am referencing visa32.dll version 5.03.49152
the definition of "VI_FIND_BUFLEN" shows the following
Const VI_FIND_BUFLEN = ?
Member of visa.VISAOtherDefinitions
So when I try to compile my program I get the compile error:
"Constant expression required" highlighting "VI_FIND_BUFLEN"
Can any one help on this please.
Thank you in advance.
12-30-2011 04:53 PM
Hello master9991,
If you look at the visa.h file located at: C:\Program Files\IVI Foundation\VISA\WinNT\include, the VI_FIND_BUFLEN is declared inside of it as:
#define VI_FIND_BUFLEN (256)
So this is why you get Const VI_FIND_BUFLEN = 256 (&H100) when referencing to the visa32.dll version 4.6.0.49152. And this should be the same with the visa32.dll version 5.03.49152.
Do you have both versions of the visa32.dll installed on the same computer?? Only one version of VISA can be installed at a time. The other posibility will be that the dll is corrupted, so you may attemp to repair or update the VISA drivers.
Regards
Mart G
12-31-2011 12:14 AM - edited 12-31-2011 12:17 AM
Hi Mart G
I have the dll's installed on two computers.
The visa32.dll version 4.6.0.49152 on one PC and the visa32.dll version 5.03.49152 on another PC.
When I compile my VB6 code on the PC with visa32.dll version 4.6.0.49152, the code compiles perfectly with out any errors and runs ok.
When I compile my VB6 code on the PC with visa32.dll version 5.03.49152 the does not compile properly.
It errors out.
Also I installed the latest version on the PC after downloading from NI.
But could not get the code to compile.
WhenI check for the definition of "VI_FIND_BUFLEN" I get under given
Const VI_FIND_BUFLEN = ?
Member of visa.VISAOtherDefinitions
01-03-2012 10:44 AM
I think Mart G is right that there's a possibility your drivers were corrupted. It seems you simply need the proper value in that DLL. You can try one of two things.
Open the DLL and type in the proper value for the parameter instead of the question mark (256 is the proper value). Or you can try to repair the installation. Here are some instructions on how to repair an installation.
http://digital.ni.com/public.nsf/allkb/AC6ED75D3D93375686256E8E00245F0D
07-01-2019 04:27 PM
07-02-2019 12:07 PM
Hi JoeDow777,
This thread is nearly 8 years old. I would create a new thread in order to get fresh eyes on your issue.