LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Getting a VI reference from specific application instance via ActiveX

I have a DLL that a C program calls to pass data into my application.  For performance sake, we had to use ActiveX to get the data into my application.  I Open an ActiveX reference to my application and then open a VI reference to a Packet Stack and throw the data right into a queue.  If I am developing, I change an INI setting to use the LabVIEW ActiveX server.  This worked fine in 7.1 with the EXE and LabVIEW.

I recently upgraded the project to 8.5.  The EXE still works with no issues, but in LabVIEW, the DLL always opens up the VI in the Main Application Instance.  If I start my program in the Main Application Instance, then everything works fine.  The problem is if I launch my program froms its project.  Then my program is running in the My Application Instance, and when the DLL calls the Packet stack, the packets don't get put into the queues in My Application.

I saw this thread where Ben used VI server to find out what project a VI belonged to.  This started me looking into using a similar method, but it seems I have to traverse the entire project to get to the VI to open a reference to it.  What I would prefer to do is look in two places, Main Application and My Application for the VI and determine its run state.  I was hoping there was some way in the VI name for open VI reference that I can specify the instance.

Please note that I am using ActiveX, not TCP/IP VI Server, so I do not believe the method outlined here can be used.

Thank you for any assistance.
0 Kudos
Message 1 of 2
(3,137 Views)
I think this should help. I have never used the ActiveX interface but this is what I think that you want.

Off course you need to translate this into C but that shouldn't be the problem

Ton


Message Edited by TonP on 02-18-2008 07:16 PM

Message Edited by TonP on 02-18-2008 07:16 PM
Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 2 of 2
(3,133 Views)