10-05-2009 02:42 PM
According to the DAQmx doucmentation:
The NI-DAQmx driver provides programmatic access to properties that you can use to configure very specific attributes of the driver. NI-DAQmx C API Visual Basic 6.0 support includes functions you call to get, set, or reset these properties. For example, the NI-DAQmx C Reference Help contains the SamplesPerChannel property. In Visual Basic 6.0, you can get, set, or reset this property using the following functions:
However, the typical "getproperties" function returns a pointer. How does one handle this is VB6?
int32 __CFUNC DAQmxGetSampQuantSampPerChan(TaskHandle taskHandle, uInt64 *data);
10-08-2009 04:45 PM
Jason,
Neither of your links seemed to work. Maybe I don't understand your question but you can do pointers in VB6 similar to C.
10-08-2009 05:46 PM
Hi Jason,
Thanks for your reply. I am aware of the article on the Code Project website. However I was hoping to see a worked example using VB6 and NIDAQmx GetProperty functions. In any case, I still have some unanswered questions. For example, suppose I get a pointer returned from a GetPropterty function - this is just an address. How do I know the format of the data that starts at this address (string (if string, length of string), Int32, Int64, Boolean, etc) - it could be almost anything, unless all of the property data is stored in the same format. If there is a standard format, then what is it?
Thanks,
Jason P.
10-09-2009 02:05 PM
Jason,
As you mentioned we can see in the C reference help that the Sample Quantity >> Samples Per Channel property is a pointer to an uInt64 that is a 64 Bit Unsigned Integer.