07-13-2006 06:39 AM
07-14-2006 05:07 PM
07-18-2006 06:47 AM
Thanks for your comment, Dan.
Yet I do get problems as none of us know how to program an activeX server so that it can be forced to be a single-instance or multiple-instance.
As I mentioned earlier, there is existing application which is written by VC++ can create multiple instances of this activeX server, all I have to do is to create multiple threads, and initiate an instance of this server to contrl multiple test targets.
My colleague said he creates the server with VC++ ATL, and cofigure it to be dual-interface and STA. And in the VC++ application side(client side), I use smart-pointer in threads to create an instance of the server:
IMySerialServer pIMySerialServer;
HRESULT hr = pIMySerialServer.CreateInstance("UUTCmd.MySerialServer");
if(FAILED(hr))
AfxMessageBox("Fail to create instance.");
And then I got multple instances of the activeX server. Every thread can have itsown com port, can send/receive commands indepently. I have no idea how can I make it work on TestStand. Would you show me some reference documents or sample codes?
Thank you
Cipher
07-18-2006 11:26 AM
Here is something to try.
Put two subsequence calls in a parent sequence to two different subsequences. Configure each to run in a separate thread and select that the thread is Apartment Threads. In each thread, create and use your server.
I don't have a concrete theory, but one possible difference between your visual C++ test, and creating your server in TestStand is that TestStand threads are in the multithreaded apartment by default. Doing the above should determine if that is making a difference.
07-24-2006 07:20 AM
Hi, James:
Thank you very much for your enlightment. After strugglig with STA and associated settings for days, finally I can create a workable tiny program which is composed of CVI, teststand and activeX servers .
Thank you, again.
Cipher.