Showing results for 
Search instead for 
Did you mean: 

VI Server - Problems between multiple dll's

Currently I am trying to implement a more object based approach to my coding, which will in turn simplify my code re-use. In order to link my code into an in-house software application which is implemented in C++, each class I produce in LabVIEW code will be compiled into a separate dll. These classes will be called directly from the C++ app or called from other LabVIEW classes (dlls) which will in-turn be called from the C++ app.

Each class has a LV2 global to store data relating to that class, this LV2 global is stored inside the class dll. I am then using the VI Server to access that particular LV2 global to retrieve the class data. The problem I am finding is that when each class (dll) is called from the C++ app, it starts a new run-time engine and hence needs a different ‘VI Server: Configuration : port number’. Provided I set the port number when compiling the application, I know what the port number is and can still access this code from other run-time engines and hence the other dlls.

My problem however occurs if the LV2 global server is loaded from a different class. The problem occurs as the LV2 global server is loaded into the run time engine of the calling dll and hence is assigned the VI Server port number of the initial run time engine. This means I can no longer access that class from my other code as I do not know the new port number.

Can anyone suggest a solution to this problem,
Thanks for any help,
Message 1 of 1