Using External Code in LabVIEW
Calling Code in Various Platforms
Using CINs versus Call Library Function Nodes
Calling Shared Libraries (DLLs)
Configuring the Call Library Function Node
Calling External APIs
Example 1: Call a Shared Library That You Built
Example 2: Call a Hardware Driver API
Example 3: Call the Win32 API
Unicode Versions and ANSI Versions of Functions
Additional Windows Examples of LabVIEW Calls to DLLs
Debugging DLLs and Calls to DLLs
Troubleshooting Calls to DLLs Checklist
Module Definition Files
Using Arrays and Strings in the Call Library Function Node
Supported Languages for Compiling CINs
Resolving CIN Multithreading Issues
LabVIEW Manager Routines
Debugging External Code
CIN Function Errors
Passing Parameters to CINs
Passing Fixed-Size Data to CINs
Passing Variably-Sized Data to CINs
LabVIEW Manager Data Types
Memory Manager
File Manager
Support Manager
CIN Routines
CIN Data Spaces and Code Resources
One Reference to the CIN in a Single VI
Multiple References to the Same CIN in a Single VI
Multiple References to the Same CIN in Different VIs
Code Globals and CIN Data Space Globals
Importing Shared Libraries
Supported Data Types for the Import Shared Library Wizard
Importing Functions from a Shared Library File
Using the Flatten To String Function
Building a Shared Library (DLL) to Call from LabVIEW
Building a Function Prototype in LabVIEW
Completing the .c File
Building a Library Project in an External IDE
Making LabVIEW Recognize a CIN as Thread Safe
Using C Code That is Thread Safe
Creating a CIN
Setting Input and Output Terminals for the CIN
Wiring Inputs and Outputs to the CIN
Creating a .c File
Compiling the CIN Source Code
Loading the CIN Object Code
Debugging CINs
Creating a CIN That Multiplies Two Numbers
Creating a CIN That Compares Two Numbers
Creating a CIN That Concatenates Two Strings
Creating a CIN That Computes the Cross Product of Two Arrays
Creating a CIN to Work with Clusters
Importing Functions from a Shared Library File
Example: Importing Functions from a Shared Library File (Windows Only)