NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Proper usage of Thread.WaitforEnd method from C++ DLL module

Here is a snippet of code that I am using in a C++ DLL module of mine:
TS::SequenceContextPtr pSeqContext_;
TS::SequenceFile *seqFile_;
TS::Thread *threadObj;
_bstr_t seqName_;
bool threadStatus;
...
At this point in the code all the variables defined above are initialized
...
threadObj = pSeqContext_->Execution->NewThread(seqFile_, seqName_, 1, NULL, NULL);
threadStatus = threadObj->WaitForEnd(-1,
                                                            true, (IDispatch *)pSeqContext_->Step->AsPropertyObject(), (IDispatch *)pSeqContext_->AsPropertyObject());
...
 
0 Kudos
Message 1 of 3
(3,106 Views)
Hello,

The Thread.WaitForEnd method waits for the thread to finish executing.  It returns True if the thread finished executing or returns False if the timeout specified expires.  Can you provide more information about what exactly you are trying to accomplish?
0 Kudos
Message 2 of 3
(3,089 Views)
Thanks for the reply. However, I wasn't aware that this message got submitted. For one I wasn't done writing it, and also I am pretty sure I figured out my problem. 🙂
0 Kudos
Message 3 of 3
(3,086 Views)