02-13-2007 10:48 AM
02-14-2007 09:52 AM
02-14-2007 12:44 PM
Hello,
Thanks for the feedback. I actually fixed the problem with the thread not operating independently, (although I can't say I'm completely sure why I needed to do what I did). The function call that starts the dialog is passed the sequence context from TestStand. In order to allow TestStand to continue I had to set the sequence context's thread to the "externally suspended" state. I can now get it to work in a very simple fashion. (Basically, all it does is open up and wait for the user to click the exit button. When that happens, the dialog uses the sync manager component to enqueue the appropriate requests to cause TestStand to stop all test sockets and exit the "process dialog requests" consumer loop. Only problem I have now, is that for some reason, if I put a break point in the sequence after the dialog has been initialized, execution on the main thread stops as expected, but then attempting to step into, step over, or continue cause it to just hang. (I can't even terminate the process - I have to actually close TestStand entirely.) So long as I don't pause execution though, it runs flawlessly.
I'm still stuck on the passing of the .NET object reference though. Oddly enough, it seems to work if I reference the object reference in a subsequence using the following syntax:
RunState.Caller.Locals.CustomDialogRef
But if I try to create an object reference parameter and pass the custom dialog ref by reference, it still fails with this strange "type mismatch"... I still can't find any solution that works for accessing the object reference from sequences that are started on a separate execution... Maybe I can store the reference in a station global... I hate using globals though - it goes against my idea of good programming.
Anyway, thanks again, and any additional suggestions are certainly appreciated.