LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Trying to use a Labview dll in Vb.NET 2003

I am trying to use a dll created by Labview 7.0 in an application created by Vb.Net 2003.

The Labview Vi takes a number and returns an array of double. I am trying a basic example before I try a more difficult. So I created a dll in Labview using 'Standard Call Conventions', I then tried to import it into VB.NET.

I have attached my basic experiment, I would appreciate any assistance.

Tim
0 Kudos
Message 1 of 4
(2,613 Views)
The issue here is .NET is very touchy about how data is passed in and out. First in LabVIEW you need to use the C calling conventions. Next, you must use the correct ByVal and ByRefs on the declare within .NET.

I made changes to what you posted and attached to this email. You will notice all the changes were in the DLL prototype in LabVIEW (I included the buildscript) and in the way it is referenced in the VB declare statement. Hope this helps!

Allan S.
Applications Engineering
National Instruments
0 Kudos
Message 2 of 4
(2,613 Views)
Thanks I can now make a 1D Array work, however I really need to pass an array of 200 rows by 24 cols. How can I do that, using VB.Net.

Thanks

Tim
0 Kudos
Message 3 of 4
(2,613 Views)
Sounds like you would do the exact same thing just make a 2-D array. Just becareful with you ByVals and ByRefs and calling conventions
0 Kudos
Message 4 of 4
(2,613 Views)