Quantcast
Channel: LabVIEW topics
Viewing all articles
Browse latest Browse all 69196

Calling LabView Shared Library DLL from Visual Studio

$
0
0

Hello Community,

 

I am using LabView 2022 and Visual Studio 2022.

 

In LabView I created a project with a vi that has a single input and output. Then I created a shared library (DLL) and added the vi as the source file using "C Calling Conventions". (Please see attachment)

 

In Visual Studio I created a Windows Forms App (.Net Framework) with .NET Framework 4.8. In the project "Solution Explorer" I right clicked reference to add a reference. Then I browsed for my SharedLib.dll file and get the following error below.

"A reference to SharedLib.dll could not be added. Please make sure that the file is accessible, and that it is a valid assembly or COM component."

 

Not sure if I am doing this correctly, but I tried using the following executable in the command prompt. This method was suggested in some forms during my search.

C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.8 Tools\TlbImp.exe SharedLib.dll

 I receive the following errors below during my attempts.

TlbImp : error TI1001 : Unable to locate input type library: C:\...\SharedLib.dll
TlbImp : error TI1002 : The input file 'C:\...\SharedLib.dll' is not a valid type library.

 

Is this the proper way to create a LabView dll? If so, how do I add the reference in my Visual Studio project to be used?

 

Any help is greatly appreciated. Thank you!


Viewing all articles
Browse latest Browse all 69196

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>