Measurement Studio for VB6

cancel
Showing results for 
Search instead for 
Did you mean: 

Make a DLL program and found problem in Win2K

NI Driver 1.7, VB 6 SP5

I have made the own test library program (ActiveX DLL) by put the VB code modules form NI such Global.bas, Niglobal.bas and Vbib32.bas that create the own class modules so that to create the like OOP style instead direct call from NI's sub routine.

It works fine on Windows NT 4 SP4 and above that all external application able to call all class library in my DLL but in same application the cause system crash (blue screen) in Win2K!!! during DLL accessing the GPIB device.

So, could some one give me the solution how to fix that.

Thanks and regards,
0 Kudos
Message 1 of 3
(3,442 Views)
Hello,

Here we have many layers of software and hardware that could be causing the problem. Let's try to isolate the problem to find the source.

There is a possibility that you might find a quick solution. If you could go to our support site in the GPIB section: http:www.ni.com/support/gpibsupp.htm then you should see one of our top ten support links that is titled, "Visual Basic, GPIB, and Windows 2000 Crashes: "BAD_POOL_CALLER" Error". After I read this Knowledge Base entry, it sounded very similar to your situation, so let's hope it works.

However if it doesn't, then I would first suggest making sure that your GPIB equipment is working correctly. I know it worked on another system, but I can't tell from your message if you have tested it in your Windows 20
00 system. If you know how to do this through National Instruments' Measurement and Automation Explorer, then please do that. If not, you can go to our installation wizard at http:www.ni.com/support/gpib which will guide you through testing tips for a particular Operating System and hardware combination.

After you have made sure that the hardware is working at a base level, could you put your DLL in a debug mode to find out where in the code it is locking your machine?

If none of this points to the solution, then please write back with all the new information you find, and we can continue looking at it.

Regards,

John N
Applications Engineer
National Instruments
0 Kudos
Message 2 of 3
(3,442 Views)
Thanks for your answer and sorry regarding my question is not clear so please read the below for more information.

There is no problem during use NI Automation Explorer. It works well both functions "Scan for Instruments" in board level and "Communicate with Instrument" in device level even multiple click.

Next, the solution as your second paragraph that advise to add ibonl(n,0) call so that to off-line a device no longer used, after tried one then found system still crash and showing message such "BAD_POOL_CALLER".

In debug mode, the locking code is quite at ibclr32 call.

By the way, the crash is occurred on second time of access GPIB device even after first time I did both close the VB and re-power on the device.

Furthermore, our
factory is using the NI GPIB card to control the equipment which more than 100 stations so far. Also we have plan to upgrade them to Win2K because it is supported the multi-language environment better than WinNT. Thus, to develop the test software for localize language will be easier.

Thanks for your support.
0 Kudos
Message 3 of 3
(3,442 Views)