Use the Application Builder to create shared libraries (DLLs) for VIs. Use shared libraries if you want to call the VIs in the shared library using text-based programming languages. Shared libraries are useful when you want to share the functionality of the VIs you build with text-based programming language developers. You also can use the Call Library Function Node to call a DLL.
![]() | Note The LabVIEW Professional Development System includes the Application Builder. If you use the LabVIEW Base Package or Full Development System, you can purchase the Application Builder separately. |
Complete the following steps to build a shared library in LabVIEW.
![]() | Note You cannot use a polymorphic VI to create DLLs because each instance subVI of a polymorphic VI has the same connector pane pattern but different data types for inputs and outputs. Use an instance of the polymorphic VI to create the DLL. |
![]() | Note When you call a shared library that includes a waveform data type, you do not have to specify a numeric value from the Data Type pull-down menu (the default is 8-byte double). However, you must specify a Dimension. If the Parameter is a single waveform, specify a Dimension of 0. If the Parameter is an array of waveforms, specify a Dimension of 1. LabVIEW does not support an array of waveforms of two or greater dimensions. |
![]() | Note All DLLs built from LabVIEW, in addition to the functions you export, contain an exported function called LVDLLStatus, with the following prototype:
MgErr LVDLLStatus(CStr errStr, int32 errStrLen, void *module); The calling program uses this routine to verify that the LabVIEW DLL loaded correctly. If an error occurs while loading the DLL, the function returns that error. Pass a string buffer to the errStr input to receive additional information about the error. Set the errStrLen input to the number of bytes in the string buffer passed as errStr. You can use the module parameter to retrieve the handle to the LabVIEW Run-Time Engine being used by the DLL. Typically, you can leave this parameter as NULL. |
![]() | Note Systems built using the Application Builder must include the LabVIEW Run-Time Engine. |