LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Build ActiveX Servers in LabVIEW

Solved!
Go to solution

Hi,

 

I am trying to implement an ActiveX server that is of type "out-of-process Server" (meaning it is a windows executable program (.exe file)) in LabVIEW.  I have seen tons of information as how to use LabVIEW as an ActiveX client and even several examples of creating a shared library (dll) with LabVIEW that other applications can access (but those are in-process servers) and examples of setting up LabVIEW as an activeX server, but nothing on how to create ActiveX objects with LabVIEW.  I need information on how to specify the CLSID for the COM object so that the user of the object can create an instance of it.  I also need to implement methods that can be invoked using IDispatch.

 

I have been searching all day and even ordered LabView: Advanced Programming Techniques, Second Edition from Amazon.com to try to find examples.  The best information that I have found is how to do exactly what I am trying to do with LabWindows.  The link to that article is here -->http://www.ni.com/white-paper/2714/en.  Is there something similar for LabVIEW?

 

Everything else i read, says to simply go to Tools -->VI Server and check Active X.  I also found this link, but i am looking for a lot more information than what is provided

http://zone.ni.com/reference/en-XX/help/371361H-01/lvhowto/activating_lv_activex_srv/  (I could not find the examples that this link references "Refer to the VBToLV.frm, VBToLV.vbp, and VBToLV.vbw files in labview\examples\comm for an example of calling LabVIEW as an ActiveX server from Microsoft Visual Basic.")

 

I was really hoping to find information on how to build ActiveX objects in LabVIEW and to implement a COM object as an executable.  Can this be done in LabVIEW?

 

 

0 Kudos
Message 1 of 3
(3,331 Views)
Solution
Accepted by glstill

@glstill wrote:

I was really hoping to find information on how to build ActiveX objects in LabVIEW and to implement a COM object as an executable.  Can this be done in LabVIEW?


I'm 99% positive the answer is no. Historically, the level of interaction LV had with the OS was never as high as it was with other languages, probably due to a combination of being supported on multiple platforms, having a pretty different programming paradigm and a relatively low perceived interest.

 

The ActiveX server that LV does have, as the link you gave explains, is a way to connect to some of the class hierarchy of LV itself, not to classes the user creates.

 

Other alternatives you have are building LV functions into standard DLLs or into interop .NET assemblies (which I'm assuming is preferable for you if you want managed code). I have no practical experience with either.


___________________
Try to take over the world!
Message 2 of 3
(3,326 Views)

This is an old post but I came across it while trying to answer another one.

 

The mentioned ActiveX Visual Basic examples were removed in LabVIEW 2013. While the interface still is present in LabVIEW (at least up to 2019, I didn't check in later versions) it is considered legacy and may eventually get axed out completely.

 

And as tst already answered, you can NOT define your own ActiveX/COM server interface in LabVIEW. The LabVIEW ActiveX server interface is whatever it is and nothing more. No way to extend it or define your own COM based interface in LabVIEW.

 

The way to do something more into the direction of defining your own interface to LabVIEW functionality nowadays, would be to create a .Net Interop Assembly from a LabVIEW VI library.

Rolf Kalbermatter
My Blog
0 Kudos
Message 3 of 3
(1,842 Views)