The attached example VI calls the .NET DLL that accompanies it, which is a .NET class built in C# to emulate a very basic calculator.
Although many shared libraries exist, and have the same extension of *.dll, you may or may not be aware that there are in fact two very different ways that DLLs are called from LabVIEW, depending on what language the Dynamic Linked Libraries (DLLs) were written and compiled in. DLLs written in both ANSI C and the .NET languages (like VB.NET and C#.NET) both have the extension *.dll when compiled, and may appear to be the same on the surface, but are inherently different in the way they are called from LabVIEW. Unlike a C-style DLL, which is called from LabVIEW using a Call Library Function Node, .NET DLLs are called using a .NET Constructor Node (Connectivity » .NET » Constructor Node in the Functions Palette). This function, when placed on the block diagram, will allow you to browse for the .NET assembly (or DLL) that you wish to use. Once you select the DLL, and the class from the DLL that you want to use, LabVIEW instantiates an object of that class, and passes a reference to the object out. With this object, you can then access all of the properties and methods of the class using Property Nodes and Invoke Nodes.
Steps to Implement or Execute Code
LabVIEW 2012 (or compatible)
.NET 3.5 Framework (or compatible)
Additional Information or References
**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.