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
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.
>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.