Search code examples
c#labview

How to call a built dll file in LabVIEW from c#?


I have tried dllimport and extern command without any success. Searched the net for some examples, which just added more to my confusion :-). Any hints? Thanks in advance.

Here is what I have tried:

Static void Main (string[] args)
{
CallLVSharedVar
}

[DllImport(@"SharedLibtoCSharp.dll")]
private extern static void CallLVSharedVar([MarshalAS(UnmanagedType.

Solution

  • LabVIEW also has the ability to create .NET assemblies, so if you have the VI source code, you could do that instead... http://zone.ni.com/reference/en-XX/help/371361H-01/lvhowto/building_a_net_assembly/