05-02-2016 11:42 PM
I've developed DLL in labview which takes 2 input parameters as string and returns back an array of strings. How can I read back this returned array of strings in labview? I tried returning a string and I can able to read it. But how to read an array?
The function signature is - void GetLoginInfo(char DBPath[], char UserName[], LStrHandleArray *Array)
Shrinivas
Solved! Go to Solution.
05-03-2016 11:04 AM
In LabVIEW, you need to create an array of strings and wire that into the LabVIEW dll interface. This sets the datatype for the parameter to be an array of strings.
You may need to initialize the array to not be empty so that the memory is reserved correctly. It has been a long time since I did this last and I am not sure about that part.
I hope that this helps,
05-03-2016 10:55 PM
Thanks Bob_Y for reply. I tried this but didn't worked.
05-04-2016 04:00 AM
I got the solution. While configuring the Call Library Function node, the argument (in which we are expecting an array of string) type should be selected as 'Adapt to Type' and data format should be 'Pointers to Handles'.
10-29-2020 04:55 AM
You can find example code on how to do that at:
https://forums.ni.com/t5/LabVIEW/Returning-an-array-of-strings-from-a-DLL/m-p/4094785