10-02-2013 04:05 PM
Hi,
I want to call a dll from LabVIEW and one of the inputs expects a pointer to double (double*). I have done things like this before and use create array to allocate the memory in LabVIEW to pass to the dll. This time what is expected is a pointer to a single double. Can I just wire a diagram numeric double to the input or will this not actually allocate memory?
Solved! Go to Solution.
10-02-2013 04:10 PM - edited 10-02-2013 04:15 PM
ToeCutter wrote:
I want to call a dll from LabVIEW and one of the inputs expects a pointer to double (double*). I have done things like this before and use create array to allocate the memory in LabVIEW to pass to the dll. This time what is expected is a pointer to a single double. Can I just wire a diagram numeric double to the input or will this not actually allocate memory?
It would be better to wire a single instead of a double, but other than that(oops, misread "single double" as "single"), yes, it will correctly allocate memory. You just need to configure the parameter as a single double passed by pointer.
10-02-2013 04:13 PM - edited 10-02-2013 04:15 PM
Thanks, but why would I pass a single when the function expects a double??
[edit]I see the confusion now- by 'single double' I mean the function expects a pointer that points to exactly one instance of a double, rather than the first element of an array.
10-02-2013 04:14 PM
Oh, sorry, misread "pointer to a single double" as "pointer to a single." Ignore that part of my comment and wire in a double.