Measurement Studio for VB6

cancel
Showing results for 
Search instead for 
Did you mean: 

VB6 and getting properties in DAQmc cAPI

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?

 

Get/Set/Reset SampQuant_SampPerChan

int32 __CFUNC DAQmxGetSampQuantSampPerChan(TaskHandle taskHandle, uInt64 *data);

0 Kudos
Message 1 of 4
(7,167 Views)

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. 

Sincerely,
Jason Daming
Applications Engineer
National Instruments
http://www.ni.com/support
0 Kudos
Message 2 of 4
(7,149 Views)

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.

0 Kudos
Message 3 of 4
(7,144 Views)

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. 

Sincerely,
Jason Daming
Applications Engineer
National Instruments
http://www.ni.com/support
0 Kudos
Message 4 of 4
(7,133 Views)