I had this solution for some time as well.....but in one year I realized that I have to update it all the time. What is worse, I had to recompile my application every time.
At the moment I ended up with more elegant solution. My application looks for a file nidaq.ini which should be located in the same folder where the executable is. nidaq.ini is a text file which has the following structure:
[241]
name=PCI-6110E
gains=0.2, 0.5, 1, 2, 5, 10, 20, 50
[244]
name=PCI-6111E
gains=0.2, 0.5, 1, 2, 5, 10, 20, 50
ADC.MinReading=0
ADC.MaxReading=4095
ADC.ZeroReading=2048
ADC.ZeroShift=2048
...
The number in the square braces is card-id as returned by Get_DAQ_Device_Info(). The advantage of this approach is that THE USERS can fix the pro
blem themselves by adding few lines in nidaq.ini or I cat tell them what to add without recompiling. I am also trying to update this file once in a while.
On the other hand, I think this is idiotism that thousands of developpers should maintain this kind of file (each developper in his own format!). NI has all this info and should provide just few NIDAQ API functions to have access to it. In fact, nidaq.dll contains all this info in some form, because it needs it to check the validity of arguments and return error code if needed.
So, NIDAQ developers, help!!!!!!!
I attach my full nidaq.ini