LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

string cluster processing

I am trying to process a cluster of strings, 

 

case: take two strings from a cluster or array and add them and return a single string using DLL

 

hear are some screenshots of my dll

 

my cpp file:

kuldeepM_0-1689250799433.png

my header file:

kuldeepM_1-1689250833203.png

my labview VI with input and outputs:

kuldeepM_2-1689250936996.png

 

Any hint of what might solve this problem will be appreciated.

 

 

0 Kudos
Message 1 of 2
(667 Views)

LabVIEW strings are NOT C string pointers but LabVIEW handles. When you pass them inside a cluster there is no option to change that. When you pass them individually as parameters you can configure the parameter in the Call Library Node to pass a compatible C string pointer to the DLL function.

 

Therefore the easy solution is to forget the cluster and pass the 2 strings as separate, correctly configured parameters. If you want to pass a structure, why?, you have to treat the strings in your C code as LabVIEW strings! And use the correct LabVIEW memory management functions when wanting to create, resize or deallocate them!

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 2 of 2
(654 Views)