First some background. I have an existing Windows application (written in MS Visual C++ 6.0) that essentially acts like a printer/plotter. There is a worker thread that receives data asynchronously from a serial port and writes the data to a file for later processing.
Now some of my customers want me to add a GPIB interface in addition to the serial interface. I have downloaded every document, application note, etc., from NI's site that I could find but I'm not finding enough information to help me figure out how to add the interface.
This is what I want to do (in a nutshell):
1) Application has to run on Win95/98/NT/2K/XP. This shouldn't be any problem but I thought I'd mention it.
2) Application has to run whether the
NI-488.2 device driver is loaded or not. For this reason I'll use what NI calls "direct entry" to access the GPIB-32.DLL (i.e. use LoadLibrary(), GetProcAddress(), etc.).
3) Receive GPIB data asynchronously from an NI GPIB interface board (e.g. PCI-GPIB) using a worker thread (same as I do for serial data).
The requirement as I see it is very simple - receive data asynchronously. But for the life of me I don't see any functions in the NI-488.2 API that I can use for event notification in a worker thread. It also seems like there isn't much in the way of sample code that I could find. The sample code I did find involved sending a command to a GPIB device and then reading the data back from the device.
I'm just in the research stage so I haven't installed the NI-488.2 driver or a GPIB card. No point spending money unless I can see a reasonable chance of success.
Does anybody know of some sample code, guidelines, etc., that may help me figure out how to use the NI-488.2 d
river to receive asynchronous data using a worker thread?
Thanks,
Mike