Search the Community
Showing results for tags 'interop'.
-
I am creating a .net DLL for a customer who will be using it in labview The method signature that I would like is int RequestData(ref myStruct[] data1) The customer who might not be very familiar with .net dll's is unable to figure out a way to invoke this... so I have been trying to figure it out using the labview community edition. Step 1 was to just see if I could pass a "ref" struct back to Labview... and here's my dll code for that and the labview sketch... using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace clusterPassing { public struct myStruct { public string myStr; public int myInt; } public class myClass { public int myMethod( ref myStruct data1) { data1.myInt = 21; data1.myStr = "test string"; return data1.myInt; } } } The labview sketch is attached In the dll code if I change the input to myStruct data1 (without the ref) I am able to invoke it but once I make it ref (as shown in the code) I get an error - 1316 Question: Is there a way to allow for labview to exchange a struct and get the value back from the .net method? I have been reading up on clusters in labview but am not sure if this is possible yet...
-
Hi all, I've been trying to figure out how to get a function made with LabVIEW 2011 up and running in MS Visual C# 2010 (.NET 4.0) I've been using this guide: http://zone.ni.com/reference/en-XX/help/371361H-01/lvhowto/building_a_net_assembly/ When i try to execute the code I made in visual studio I get the following error: Failed to call InitLVClient function I've seen this thread: http://forums.ni.com/t5/LabVIEW/VIAssemblyException-quot-Failed-to-call-InitLVClient-function/td-p/1472988 My question to you is, is it possible to create LabVIEW 2011 code for use in Visual C# 2010? If so does anybody have a link to a guide on how to export LabVIEW 2011 VIs into a format that can be called from Visual C# 2010? Even better yet, does anybody have any example code I could work off?