Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

VI_FIND_BUFLEN

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.

 

0 Kudos
Message 1 of 6
(5,243 Views)

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

0 Kudos
Message 2 of 6
(5,234 Views)

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

 

0 Kudos
Message 3 of 6
(5,229 Views)

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

Ravi A.
National Instruments | Applications Engineer
0 Kudos
Message 4 of 6
(5,211 Views)
Hi, Master9991, How do you fix the problem eventually? I run into exact the same problem. Thank you. Joe
0 Kudos
Message 5 of 6
(3,473 Views)

Hi JoeDow777,

 

This thread is nearly 8 years old. I would create a new thread in order to get fresh eyes on your issue.

Jiwhan S.
Technical Support Engineer
National Instruments
0 Kudos
Message 6 of 6
(3,458 Views)