NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Reagarding Test Stand API usage in Windows services

i am  using  teststand APIs in Windows services. but got stuck when trying to get engine from application manager object. I am using evaluation version so may be the Dialog appears for evaluation version creating problem.  suggestion & thoughts are welcomed.
 
~Manoj
0 Kudos
Message 1 of 7
(3,748 Views)
Hi,

I'm not sure I fully understand your question.  What language are you programming in?  Also, can you describe exactly what you are trying to do?
0 Kudos
Message 2 of 7
(3,730 Views)

Hello Terry,

              I am dynamically creating sequence in window's service of my application which is developed in .Net.

but as i am using evaluation version of test stand, when i am trying to get engine object from application manager object, operation fails and application hangs. same code is working well with form based application ( but not with  windows service).

may be the dialog appears where it was asked that want to purchase,register or want to use evaluation version of test stand, creating problem in win services. as same dialog is also appearing when i am using same code in windows application but not appearing when i am using in win service.

so, is ther any way to remove that dialog or i have to purchase test stand 3.1. 

~Manoj

 

0 Kudos
Message 3 of 7
(3,690 Views)
Hi Manoj,

There isn't a way to remove the Evaluation Dialog box.  The only way to remove that is to purchase a license and activate the software.
0 Kudos
Message 4 of 7
(3,675 Views)

 

Hi Terry,

  As you told i have purchased license of Test Stand but still i am not able to use Application manager component in  Test Stand. As Application manager is STA component it is not instantiated in windows service which is MTA by nature.

 

Any one can guide me how can I use this component in windows service.

 

When I am using this component following exception is thrown by component on instantiation.   

 

{"Could not instantiate ActiveX control '0004483b-7cbc-4fa1-b92c-19028a66ed74' because the current thread is not in a single-threaded apartment." }

 

Manoj

0 Kudos
Message 5 of 7
(3,578 Views)
Hi Manoj,

You will need to create an STA to use the Application Manager.  Also, the Application Manager expects to be on a form and if not, it will throw an error.  Let me know if you have any questions.
0 Kudos
Message 6 of 7
(3,546 Views)

Hi Terry,

Thanks. I have implemented it Suceessfully.

~Manoj

0 Kudos
Message 7 of 7
(3,536 Views)