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?