Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic import of x64 NI4882.DLL does not work

Hello all,

 

I am writing KI-VISA driver code for NI-488.2M (genuine NI & other compatibles) support for 64bit system.

 

My code was originally written by traditional static-link approach with linking with 64bit version of ni4882.obj.  This works fine.  But due to some reason, my code has to change the linking approach to use "dynamic-import" of the 64bit NI4882.DLL such as using LoadLibrary() and GetProcAddress(). (This is because an NI compatible GPIB vendor apparently uses different DLL file name rather than NI4882.DLL.)

 

In fact, LoadLibrary() for "NI4882.DLL" and GetProcAddress() for such as "ibfindW" or "ibask" function can obtain the right function addresses.  But when invoking these function, it always returns 0x00008000.  This value is also returned by ThreadIbsta().  As seeing NI-SPY, iberr is EDVR(0) and ibcntl is 0xE00A008B.

 

The strange point is, the same approach for 32bit (or WOW64) importing 32bit "NI4882.DLL" or "GPIB-32.DLL" does not have the problem. I thought it might be a driver's install problem, but the traditional static-link approach still works under the same condition.

 

Is something lacking for the steps for calling GPIB APIs? Or do I need have any different steps than 32bit apps?

 

 

My environment is:

 

Windows 7 (x64) English / Core2Quad / 4GB

NI-488.2M 2.7.3

Visual C++ 2008 SP1

KI-VISA 4.2.4 under debug (NI-VISA is not installed)

 

hardware:

GPIB-USB-B

GPIB-USB-HS

GPIB-ENET/100

PCI-GPIB

etc... 

 

 

Thanks and best regards.

 

Makoto,

Apllication R&D Section / KIKUSUI ELECTRONICS CORP.

 

 

 

 

 

 

 

Message Edited by Makoto on 04-09-2010 06:54 PM
0 Kudos
Message 1 of 1
(3,632 Views)