Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Can't find DLL entry point RegisterGpibGlobalsforThread in ni4882.dll

I'm attempting to collect data using a gpib-usb interface and display the data in an Excel Spreadsheet using Visual Basic for Applications and NI 488.2 ver 3.1.2 software in Windows 7 64 bit.  The macros in the spreadsheet worked fine using the gpib-32.dll in Windows XP, but not in 64 bit Windows.  Switching to the ni4882.dll caused the subject error after having added PtrSafe to all of the Declare statements.  I'm not an expert programmer, but I'm hoping there is an easy fix. 

0 Kudos
Message 1 of 3
(6,181 Views)

Hi gtr999,

 

Are you simply adding the PtrSafe keyword to the gpib-32.dll function calls in your adaptation? Switching to ni4882.dll requires some modification of your code. I assume you are using VBA7. You could also port your code to the NationalInstruments.NI4882.dll assembly, which contains the .NET API that is easier to use (although harder to port to)

 

I would suggest taking a look at this thread. Including the declarations part of your code could also be helpful here.

Xavier
Message 2 of 3
(6,112 Views)

@gtr999 wrote:

I'm attempting to collect data using a gpib-usb interface and display the data in an Excel Spreadsheet using Visual Basic for Applications and NI 488.2 ver 3.1.2 software in Windows 7 64 bit.  The macros in the spreadsheet worked fine using the gpib-32.dll in Windows XP, but not in 64 bit Windows.  Switching to the ni4882.dll caused the subject error after having added PtrSafe to all of the Declare statements.  I'm not an expert programmer, but I'm hoping there is an easy fix. 


Are you using 64-bit office, or just 64-bit Windows? As long as your application is 32-bit, you should continue to use gpib-32.dll. These functions which were only used for older versions of Visual Basic don't exist in ni4882.dll, as we expect that customers developing 64-bit applications will be using the .NET interface.

0 Kudos
Message 3 of 3
(5,833 Views)