To download NI software, including the products shown below, visit ni.com/downloads.
The example will guide you through using DLLs built using Visual C++ in the C compiler of LabWindows/CVI
While calling C based DLLs in LabWindows/CVI is a breeze, calling DLLs built in other languages such as Visual C++ can be somewhat more involved. This example will demonstrate how to properly set up a project in Microsoft Visual Studio to build a visual C++ DLL. Then, we will call functions from that DLL in LabWindows/CVI.
Steps to Implement or Execute Code
|extern "C" __declspec(dllexport) double __cdecl DGAdd(double a, double b);|
|extern "C" __declspec(dllexport) double __cdecl Subtract(double a, double b);|
|extern "C" __declspec(dllexport) double __cdecl Multiply(double a, double b);|
Additional Information or References
Refer to Section 9 of FAQ: Using Dynamic Link Libraries with NI LabWindows/CVI
**This document has been updated to meet the current required format for the NI Code Exchange.**
Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.