LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Call Library function Node and pointer to a pointer

Hello,
 
I am using external C++ code on LabView with the Call Library Function Node. Some functions of my DLL have arguments that are pointers to a pointer. For example, I defined the following function: int Function_Name (void** variable_name). In the configuration window of this DLL (by right-clicking on the Call Library Function Node and selecting Config), how can I declare suc a parameter ?
 
Thanks for your answer.
 
J.F.
0 Kudos
Message 1 of 4
(3,304 Views)
You could try naming the parameter *parameter_name, and set up the type as adapt type.  The result as shown in the function prototype would be:
 
long funcName(void **parameter_name);
 
I'm not sure if Labview will fail at this approach, but it's worth a try.
 
Wayne
0 Kudos
Message 2 of 4
(3,297 Views)
That can work for one pointer, but for a pointer to a pointer you have to write a wrapper function in C\C++ which will get the data and call that function to get the data into LV.
 
Another option would be to get just the pointer value (the number) and not the data the pointer points to. You can pass that value into additional DLL calls, which can then use it.

___________________
Try to take over the world!
0 Kudos
Message 3 of 4
(3,291 Views)
Hi,
 
I suggest that you search your question before posting it. some times you may find a whole discussion dealing with the problem in several days and you will save your time.
 
If you are interested in a quick solution I suggest this. see mydll.zip and use it as a wrapper dll.
If you are interested in others' discussion on the same topic, see this
 
I hope it can help.
0 Kudos
Message 4 of 4
(3,288 Views)