NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Get Sequence context from ActiveX reference

Hello,

I am passing to MFC DLL ActiveX reference to freshly created new execution. In examples it is shown how to pass "ThisContext" to DLL (struct IDispatch *seqContextDisp) but i need something like :
- create new execution, save ActiveX reference in local variable
- pass reference to DLL
- in DLL get from reference sequence context and perform some operations (get/set vaiables, etc.)

Thanks.
0 Kudos
Message 1 of 6
(4,253 Views)
Simply call a sequence and in "Specify Module" - "Multi-threading and remote execution" specify "run sequence in new execution" and within that sequence follow what is demonstrated for writing and reading of variables
0 Kudos
Message 2 of 6
(4,253 Views)
Thats how i am doing it now.
But i want to use reference saved by option "Store an ActiveX Reference to the New Execution in:" in my mother-execution (pass to DLL). The main question is - how to declare in DLL this parameter (reference) and how to get "ThisContext" of child-execution having its ActiveX reference.

Thanks.
0 Kudos
Message 3 of 6
(4,253 Views)
I'm not sure I fully understand the question but I'll take a stab at it anyways. First if you want to have seq context of the new execution; review my sample seq file I sent along. In this seq file you can pass seq context of the new execution to a dll in either seq/execution.

If this is a simple "C" type question the prototype/code would look something like the .cpp file I attached.

My stuff may have a couple different parameters!

If I misunderstoo the question you might want to send me what you got so far... It might be eaiser for me to see what you are tyring to do and I can finish an example for you.

stevemc@tellabs.com
Download All
0 Kudos
Message 5 of 6
(4,253 Views)
Here is some sample Stuff
Download All
0 Kudos
Message 6 of 6
(4,253 Views)
Hello,

When you launch a new execution you can get a reference to the execution. You will need to create a local variable in TestStand that is of type ActiveX Reference, that will store this new execution reference. You can then pass this reference to your DLL as an IDispatch. Once you have this reference, you can then call the method Execution.GetThread. Now that you have the thread reference, you may call the method Thread.GetSequenceContext.

Hope this helps!
0 Kudos
Message 4 of 6
(4,253 Views)