Hello,
I was a little slack with variable checking and got no compiler warnings, and suddenly I was overwriting (non array) variables. Probably because I was taking shortcuts with variables for DAQmx functions.
As an example for the three functions that are sufficient for executing A/D with a NIDAQmx task:
- DAQmxGetTaskAttribute uses a pointer to an uInt32 for the number of channels
- DAQmxGetTimingAttribute uses a pointer to an uInt64 (?) for the number of samples per channel
- DAQmxReadAnalogF64 uses int32 for the number of samples per channel, an uInt32 for the size of the output array, and a pointer to an int32 for the actual read number of samples per channel.
I did not check all the variables for this strange combination of variable types, and did not do the required type conversion. But also, I got no warnings from the compiler while all the compiler warnings and extended debugging level is on.
So: how can I get the compiler to check that the pointers to output variables from DAQmx...Attribute have the proper type ?
Regards, Jos