I have a LabWindows application that controls an Agilent power meter (4416) on a GPIB, via Agilent's 82350 PCI card ... and their device driver. The LabWindows VISA library is used to send commands to the device. The TULIP passport was activated, using MAX, to get access to the Agilent device driver from the LabWindows application.
The application builds OK ... no errors. It runs OK and controls the device ... no errors. But on exit, the program terminates with a "General Protection Fault". The "Run-->Threads" shows there's an orphaned thread that does not get terminated. I believe it's a DLL thread started by the device driver when "viOpen" is called. Before the program terminates, viClose() is called to the session t
o the device and then to the defaultRM, in that order.
During runtime, and after viOpen(), there are 4 "unnamed" threads created, in addition to the main. I think one of these is not getting unloaded on program "exit".
Has anyone seen these symptoms? Is there a way to "unload" DLL threads, even those started from a device driver, on program exit? Did I skip something during the TULIP setup? Any advice, info will be appreciated. Thanks.