Configure Call Library Function Node for Function Returning Pointer

Updated Nov 10, 2017

Reported In

Software

  • LabVIEW 2017 Professional
  • LabVIEW 2016 Professional
  • LabVIEW 2015 SP1 Professional

Issue Details

In my LabVIEW VI I would like to call a function from a C language DLL using the Call Library Function Node. The header file shows that function returns a pointer of "unsigned char" type. Such data type is not available on when I am configuring the data type of the return parameter on the Parameters tab of the Call Library Function configuration dialog. What data type should I configure in this case?

Solution

In this case use the following settings:
  1. Double click the Call Library Function Node to display the Call Library Function configuration dialog.
  2. On the Parameters tab click return type in the parameter list.
  3. Set Type to Numeric.
  4. Set Data type to Signed Pointer-sized Integer.
 

Additional Information

For more information about passing and receiving pointers between C/C++ DLLs and LabVIEW please refer to this page.
If you need to access data that is referenced by the pointer directly in your LabVIEW VI (dereferencing), please refer to this page.

WAS THIS ARTICLE HELPFUL?

Not Helpful