09-04-2017 10:29 AM
Dears
I'm trying to call a C++ dll, the function has parameters defined as following header:
CGyroscopeDetect(OUT float& x, OUT float& y, OUT float& z, OUT float& value);
In VS2012, it can be called by following code:
float yyy[4] = {0.0};
CGyroscopeDetect(yyy[0], yyy[1], yyy[2], yyy[3])t
But I can not make it by LabVIEW dll call, although changed differenct kinds call parameter settings, anyone know that?thanks a lot.
WD
09-04-2017 02:21 PM - edited 09-04-2017 02:29 PM
AFAIK, yyy[4] means "pointer to the 5th element" (not the girl from the movie). You should be able to simply index the fifth Element, and use that as input. The call library node should have it's input as pointer to value. That's the only way LabVIEW can have a parameter as input\output (pointers and\or handlers).
BTW, a pointer is not a reference, but both will mostly be compiled to the same code. However, a programmer can do arithmetic on a pointer, and that's not allowed with a reference. That makes pointers usually more dangerous. As far as LV goes, I'd consider them the same.