03-29-2006 06:26 PM
03-30-2006 04:37 PM
03-31-2006 11:04 AM
I wouldn't create another instance of the engine in a separate process to share station globals because any changes to globals in the first process that have not been persisted will not be seen by the second process and vice versa.
You could register TestStand objects such as the engine (or even a sequenceContext if you made sure you only used it while it is active) with a third ActiveX executable process that would provide an interface for other processes such as your executable to retrieve the registered object.
The NI Session manager is capable of doing this, but I don't know if there are any examples for this. The trick would be to register the objects you want to share with a custom session whose name begins with an asterisk. The asterisk tells the session manager to hold on to the object in an external singleton process so that any process that requests the same session name gets the same object instance.
Of course, if you are using ActiveX in your exe, it would be simpler to make your exe a server and just pass data via method parameters using the ActiveX adapter. Of course, then you should consider that if your server was a dll instead on an exe, you could instantiate it in the same process and your performance would be much better.