09-25-2006 09:04 AM
09-29-2006 01:26 AM
09-29-2006 01:30 AM
09-29-2006 01:49 AM
09-29-2006 09:41 AM
02-06-2008 05:55 AM
I want to create an insance of the TestStand engine to work with TestStand. without using the ApplicationManager.
I'm using .Net 2.0 with C#. The reason is that I don't have a Userinterface to place the control on it. So there must be a way to start TestSand without the Manager classes
02-07-2008 07:22 AM
02-07-2008 08:29 AM
yes that's right. the problem was that I have to call
msg.Acknowledge(); in the Eventhandler
engine_UIMessageEvent(UIMessage msg)
otherwise the engine do not send messages any more. And I have to set engine.CurrentUser.
Now the problem is to ReleaseSequenceFileEx(..) after an execution. The return value is false. I'll check if there is somthing loaded or not released.
02-07-2008 01:00 PM
02-07-2008 01:37 PM
re: "I'm using .Net 2.0 with C#. The reason is that I don't have a Userinterface to place the control on it. So there must be a way to start TestSand without the Manager classes"
Just put the manager controls on a form that you load but don't display. Programming with the manager controls is much easier than without.
re: "Liberal use of Marshal.ReleaseComObject(obj); and obj = null; goes a long way in helping keep eveything tidy."
The .net UI examples work fine without any calls to Marshal.ReleaseComObject(obj). They do this with a couple of strategically placed calls to GCCollect. In fact, ReleaseComObject can't be used to ensure all TestStand objects are released before engine shutdown because the .Net/COM interop layer creates temporary wrappers for event parameters that your code never sees when it processes ActiveX events for which you do not provide handlers.
In general, TestStand only expects that all TestStand references are released by engine shutdown time and that sequence files are released in a timely manner in order to trigger their unload callbacks (I can't recall at the moment whether this is purely triggered by ReleaseSequenceFileEx, or if holding a plain COM reference could prevent an unload callback from firing). Note that the explicit releasing of sequence files is a special case that communicates to the engine how the file is being used. In .net, you have no need to explicitly null out a TestStand object variable as long as your application variables no longer reference the object by the time shutdown occurs. This means, that you shouldn't ever need to set a local or parameter that holds teststand object to null.