NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

ActiveX Reference Problem

I'm trying to use a VB ActiveX dll to run a test for me. When I run in the TestStand Development environment which call the compiled dll, I have no problem. However, when I launch the VB project (so that I may step into the dll source code) and run TS in its development environment, I get the following error:
"Create New Object" in automation call failed.
No such interface supported

Can anyone give me guidance? I ceate a new object and set my ActiveX reference to a local variable of type ActiveXReference.
0 Kudos
Message 1 of 3
(3,334 Views)
If you are launching your VB project and calling your code from within that environment, the handle will not be valid since it did not come from TestStand.

What we do in CVI is to select the external process (which in this case would be TS). We then use the deugger of CVI to load TestStand. Since the debugger now owns this process, it can handle breakpoints within my DLL's or CVI Source code.

What you need to do is to work out how to set the VB debugger to launch TestStand for you when you say debug project. (This maybe called the same, as in Select External Process). When your TestStand step reaches the VB DLL source code, it will be able to break, or allow you to single step etc. But only if VB controls the process (belonging to TestStand).

So if you ru
n TestStand Manually, and then run your VB project it will not run.

VB must launch TestStand for you.

Not doing VB, I can't say if or how this can be done, only that you need to do it.

Regards

Chris
0 Kudos
Message 2 of 3
(3,334 Views)
Maz,

> I'm trying to use a VB ActiveX dll to run a test for me. When I run
> in the TestStand Development environment which call the compiled dll,
> I have no problem. However, when I launch the VB project (so that I
> may step into the dll source code) and run TS in its development
> environment, I get the following error:
> "Create New Object" in automation call failed.
> No such interface supported
>
> Can anyone give me guidance? I ceate a new object and set my ActiveX
> reference to a local variable of type ActiveXReference.

The order I perform VB ActiveX DLL debugging is:

1) If either are open, close Sequence Editor and Visual Basic. While
closing VB isn't 100% necessary, closing Sequence Editor is. Once you use
the DLL version of a component, Sequence
Editor will not switch to the VB
debug version in the same session. You'll need to close Sequence Editor
before switching between the DLL and VB debug versions of your component.
2) Start VB.
3) Open the ActiveX component project.
4) Verify the "Wait for components to be created" option is checked in the
ActiveX component's Project Properties->Debugging dialog.
5) Set VB breakpoints.
6) Select "Run->Start with full compile".
7) Open Sequence Editor.
😎 Load sequence that references ActiveX component.
9) Execute the sequence.

You should eventually hit your VB breakpoint.

If this doesn't work for you, make sure you're referencing the correct
ActiveX component from TestStand. If you've changed the API or if you don't
have Project Compatibility checked in the ActiveX component's Project
Properties->Component dialog, you may have more than one component
registered with the same name, just different versions. Make sure TestStand
is using the latest version before you begin.

Good luck,


Bob Rafuse
Etec, Inc.
0 Kudos
Message 3 of 3
(3,334 Views)