NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Setting optional parameter stepToStoreResultsIn of Thread.WaitForEnd() method

This question is  related to an earlier posting of mine regarding launching a thread from a c++ code module (http://forums.ni.com/ni/board/message?board.id=330&message.id=15383&query.id=775150#M15383). I am launching a new thread from a code module (c++ DLL), and I need wait for it to finish.
 
There are 2 ways I envision doing this:
1. wait for the new thread to finish before returning from my code module by calling Thread.WaitforEnd()
2. return a reference to the new thread to the calling sequence and make the calling sequence wait for the thread to complete before terminating using a wait step at the end of the sequence. 
 
My questions are regarding method 1, where I would call Thread.WaitforEnd(). I want to set the parameter stepToStoreResultsIn to set the result of the step in the calling sequence to the result of the sequence executed in the new thread:
 
a. Do I understand the purpose of the stepToStoreResultsIn parameter correctly?
b. The stepToStoreResultsIn parameter must be a variant, so how do I pass in the step context as a variant? is it the same as a IDispatch pointer?
0 Kudos
Message 1 of 2
(3,049 Views)
a. Yes
b. Yes
 
Smiley Happy
0 Kudos
Message 2 of 2
(3,046 Views)