02-03-2008 02:49 PM
Public Sub Startup(ByRef seqContext As SequenceContext)
Try
'Show the titlebar form
Me.Show()
'Keep a ref to the TS engine
tsEngine = seqContext.Engine
Catch ex As COMException
End Try
End Sub
02-03-2008 03:06 PM
Whoops, this thing took off on me before I finished the question:
Anyway, the problem I'm having is this:
When I call any of my sequences in my FrontEndCallbacks.seq from the sample operator interface, all seems to work just fine.
So I thought I would instantiate a .Net object from an Action step inside one of my FrontEndCallback sequences, and the .Net object gets an Engine reference from the sequenceContext that I pass on the call.
The .Net object creates a Form, and I can click on object on the form, and the form can use the saved Engine reference to make a call to DisplayMessageBox(), and that seems to work fine.
But, if the .Net object trys to make a call to CallFrontEndCallbackEx() with the name of one of my sequences in FrontEndCallbacks.seq, I end up with a hung TestStand....
So my question is this: can I only make calls to CallFrontEndCallbackEx() from the same object that started the TestStand engine (in this case, the operator interface), or am I just making a simple mistake in how I am trying to use the call?
I have attached the .Net code for my simple attempt to make this work (I know, it's missing all the good stuff in the Catch clauses, but I'm just trying to get a simple example to work!).
Thanks!
02-04-2008 10:46 AM
02-04-2008 01:21 PM
02-06-2008 06:43 PM
Hey Michael,
I just tried the same idea out, but I wrote an ActiveX EXE server to perform the same kind of functionality.
From the FrontEndCallbacks.seq, I called the "Startup" entry point of the ActiveX EXE and passed the sequenceContext as a parameter.
The "Startup" routine in the ActiveX EXE stores a reference to the TestStand engine.
The FrontEndCallback sequence completed, and I was left with a form that was being displayed by the ActiveX EXE, just like my .Net example.
When I click on the image on the form, the ActiveX EXE uses the TestStand engine reference to make a "CallFrontEndCallbackEx()" call, and the front end callback sequence runs as desired.
So, the ActiveX Server works fine, but the .Net example does not....
Maybe this will give you more to go on, I don't know....
02-06-2008 06:45 PM