LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Relationship between LabVIEW and ActiveX

According to the tutorial document <Calling LabVIEW VIs from Other Programming Languages>, LabVIEW inter-op with applications in other languages via ActiveX mechanism. However, when I analyzed the attached files of <Calling LabVIEW DLL from a C# app>, also attached here, I found that there are only five APIs in this DLL: Add, Divide, Multiply, SubStract, and LVDLLStatus. The first four are corresponding functions for VIs I designed in LabVIEW, and LVDLLStatus is generated when it's built. I have two questions about this DLL file:

 

1. Since the APIs in the DLL are quite simply, and there are no ActiveX interfaces. I'm not sure how ActiveX is involved in the inter-op between LabVIEW and applications with other languages.

 

2. When I analyzed this DLL in a tool Depends, I found that it had only four dependent DLLs: Version.dll, AdvAPI32.dll, User32.dll and Kernel32.dll. None of them is related to LabVIEW. It seems that there is no dependece on LabVIEW Runtime (lvrt.dll). I'm not sure how LabVIEW Runtime is involved when we are trying to invode this Dll applications in other languages.

 

Any suggestions and comments will be sincerely appreciated. Thanks.

0 Kudos
Message 1 of 4
(2,718 Views)

Interesting questions.  Not sure if I can completely answer it, but I'll add my 2 cents:

 

1.   If you compile your VI into a DLL, and then call it from another language (e.g. VB), I don't think that Active-X is (necessarily) involved.  This is evident by the fact that you can build a shared library for a Macintosh OS (which can't do Active-X).  At the beginning of the tutorial, it says:

 

  • You can call a LabVIEW VI from other programming languages ... using ActiveX or by building VIs into shared libraries. 

 

2.  Not sure if I can explain why DEPENDS does not mention lvrt.dll, but I am quite certain your calls to the DLL will fail if you don't have the LV runtime engine installed.  Unfortunately, NI is pretty adamant that users install the HUGE run-time enviuronment, which was over 100 MB last time I checked... a big complaint by many LV users.

 

 

http://www.medicollector.com
Message 2 of 4
(2,689 Views)

Thanks for your reply.

 

1. It looks like shared library is not for ActiveX. Therefore, I'm wondering how to build VIs into a DLL for ActiveX. Any tips will be sincerely appreciated.

 

2. I tried to debug a C# application which is calling VIs, and found that the LabVIEW runtime (lvrt.dll) is nerver loaded. Therefore, I'm wondering whether it's really necessary to install LabVIEW runtime to invoke VIs in other applications. I'll be very glad to read any comments about this topic.

 

 

0 Kudos
Message 3 of 4
(2,667 Views)

As your question:

1) You can refer to LabVIEW  help document for detail implementation steps about dll generation;

2) Whether it's neccessary or not for running of dll in another computer, please refer to the following link:

http://digital.ni.com/public.nsf/allkb/B727BE0152F606D486256A22004DE82D?OpenDocument

 

NI Application Engineer

Ben

0 Kudos
Message 4 of 4
(2,612 Views)