Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Win2000 and GPIB Crashing using ilfind

We just got a new PC with Win2000 and we have discovered a problem that appears
to be in NI VB driver files for GPIB.

Using ILFIND function works fine the first time it is used. If my program
is stopped and restarted WIndows crashes with BAD POOL CALLER blue screen
when ILFIND is used again. I have isolated the line in VBIB-32.BAS that causes
it:

Function ilfind(ByVal udname As String) As Integer
' Check to see if GPIB Global variables are registered
If (GPIBglobalsRegistered = 0) Then
Call RegisterGPIBGlobals
End If

' Call the 32-bit DLL.
ilfind = ConvertLongToInt(ibfind32(ByVal udname)) 'CAUSES BAD POOL CALLER
BLUE SCREEN

Call copy_ibvars
End Function

We need a fix for this ASAP!
0 Kudos
Message 1 of 6
(3,855 Views)
>We just got a new PC with Win2000 and we have discovered a problem that
appears
>to be in NI VB driver files for GPIB.


What GPIB card & NI-488.2 Software version are you using?

Pu
0 Kudos
Message 2 of 6
(3,855 Views)
We are using the AT-GPIB/TNT PnP card with version NI488 v1.60 drivers.
What is the condition you are having?
0 Kudos
Message 3 of 6
(3,855 Views)
I have done further analysis on why ILFIND causes a blue screen in Win2000
and have discovered the following:
1. The crash does not occur when running a compiled (exe) of my Visual Basic
program.
2. The crash does not happen if it is run with the IDE then stopped and Visual
Basic is then closed. If you re-open VB and reload and run the program again
no crash occurs, providing you only run it once.
3. The crash only happens if you happen to access the ILFIND function twice
without closing Visual Basic between attempts.
0 Kudos
Message 4 of 6
(3,855 Views)
I was contacted by NI today with a successful fix to the problem we were having.
Kudos to NI!!!

The problem was that I did not use the ILONL function after using the ILFIND
function. After adding the INONL function everything worked great.
0 Kudos
Message 5 of 6
(3,855 Views)
>The problem was that I did not use the ILONL function after using the
ILFIND
>function. After adding the INONL function everything worked great.

That's great. But normally device drivers MUST NOT knock out the OS
even if you access the driver in a bad manner. This kind of error should
be raised in the user-mode modules (such as GPIB-32 dll), not in kernel
mode.

Ma
0 Kudos
Message 6 of 6
(3,855 Views)