Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

gpib.dll

The vb module VBIB.BAS doesn't found the gpib.dll file in NI sample application.
The required file is present in system32 folder.
0 Kudos
Message 1 of 4
(6,420 Views)

I believe you are running old Win16 (16bit Windows such as Windows 3.1) program.  The 16bit GPIB.DLL is provided for backward compatibility to old 16bit GPIB apps and operates with universal thunk or generic thunk mechanism, redirecting every NI-488.2 function call from/to GPIB-32.DLL.

The correct location for 16bit DLLs under Win2NT/2k/XP platform is <WinDir>/System, not <WinDir>/System32.

0 Kudos
Message 2 of 4
(6,405 Views)

Hello makoto, thank you for your reply.

I have changed the following line (and all the similar...) in the VBIB.BAS module

from :

Declare Function route_IBDEV Lib "gpib.dll" (ibsta%, ByVal bdid%, ByVal pad%, ByVal sad%, ByVal tmo%, ByVal eot%, ByVal eos%) As Integer

to:
 
Declare Function route_IBDEV Lib "gpib-32.dll" (ibsta%, ByVal bdid%, ByVal pad%, ByVal sad%, ByVal tmo%, ByVal eot%, ByVal eos%) As Integer
 
but the compiler give me another error:
 
start point of route_IBDEV dll not found on gpib-32.dll.
 
first of all I've just reinstall all the NI 488.2 software, because I've found an old 16bit installation in my PC.
 

 
0 Kudos
Message 3 of 4
(6,393 Views)

I thought you are attempting to run a 16bit VB (version 3 or older) program with the true or thunk-layered 16bit GPIB.DLL, but what you are trying is operate an old VB program with source codes (originally written for 16bit GPIB.DLL) converting into VB6 under today's platform (Win2k/XP) with the GPIB-32.DLL.  Sorry for my misunderstanding.

In your case, you don't have to modify the VBIB.BAS file.  Instead, just replace VBIB.BAS with VBIB32.BAS in your VB6 project.  The VBIB32.BAS declares GPIB-32.DLL public functions for VB6.  Because the NI-GPIB API is kept unchanged for its syntax for GPIB-32 version, any GPIB calls in the old VB program will be source-code compatible with the new VBIB32.BAS. 

The VBIB32.BAS is automatically installed with the NI-488.2M Win32 drivers, so you will find it in the NI-488.2M installation directory.

Makoto

0 Kudos
Message 4 of 4
(6,384 Views)