LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Using multiple COM interfaces

Is it possible to use multiple interfaces on single ActiveX object? I have found out that LabView is capable of using any of the interfaces on the object but I always have to create a new object with suitable typed interface. I have not been able to do the COM "QueryInterface". In VB this is done by simply assigning one type of object reference to another. In C++ the QueryInterface is used. But how to do it in LabView?
0 Kudos
Message 1 of 3
(2,796 Views)
With LabVIEW 6 you can wire the incoming reference to a Variant to Data node with the appropriate reference wired to the conversion type. This will perform the QueryInterface for you. Be sure to close the incoming reference to the Variant to Data after the conversion.

Marc
0 Kudos
Message 2 of 3
(2,796 Views)
So if there are 4 interfaces and I want a control for each one so I can use them at any point in my program without recalling Variant to Data - How many times do I need to close the object? In C I would do a Release for each interface that I query for because query interface increases the object's reference count each time it is called. It is unclear how this is handled in LabVIEW. Do I really have 4 references to the object? Or does the Variant to Data close the old reference?

john
0 Kudos
Message 3 of 3
(2,796 Views)