PXI

cancel
Showing results for 
Search instead for 
Did you mean: 

Call Library Function with C structure

I have been given a MS C++ DLL that I need to call from LabVIEW. The input (and output) to the DLL are pointers to "C" data structures.

The LabVIEW "Call Library Function" VI allows you to add input parameters and define their type (I.e. Numeric, Array, String, etc.) However, "C data structure" is not one of the options. Is there a way in LabVIEW to call/use a MS C++ DLL that requires a data structure as an input and returns a data structure as the output?
0 Kudos
Message 1 of 2
(4,039 Views)

It is possible to pass structures to called DLLs in LabVIEW. Typically the structure will be passed through the means of a cluster. Please see the link below for more information on calling external code in LabVIEW.

Using External Code in LabVIEW

You can also find a great example VI on calling DLLs in the LabVIEW example finder. Search for the keyword DLL and open up Call DLL.vi. This example shows most of the common ways to pass data between LabVIEW and external code.

Regards,

Matt F

Message 2 of 2
(4,039 Views)