NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

TestStand ActiveX component fails to instantiate

Hello everybody,

 

Hope everybody would be doing good.

 

I'm using Experession edit (TS 4.0 ActiveX component) in my C# application.And i'm calling the C# dll from Test Stand 4.0. I'm passing the sequence context of the executing sequence to be used by the Expression edit to show up all the TestStand variables.

 

The problem is when the .NET compiler calls InitializeComponent() method to create instance of all the controls on the UI. I get the error which says it failed to create an instance of ExpressionEdit.The Error reads as " ActiveX control 'a5bf99d8-9325-4168-8c33-0d80bff39ad8' cannot be instantiated because the current thread is not in a single-threaded apartment" . I really don't how to come over this error.

 

It will be really great if someone can help me with this.I'm attaching the C# code as well as sequence file.

 

Thanks in advance

0 Kudos
Message 1 of 2
(3,022 Views)

Hi,

 

I was trying to open the sln - file but it failed

Opening the project file was successfull some references are missing AND there was NO assemblyinfo.cs!

I got it complied.

 

in your Seq there is a link to completely ohter assembley i changed it. Then i got same error as you.

 

Your class was not derived from IDisposeable.

Was not able to complie again i think of missing some other stuff like assembleyinfo

 

By the way check out this example and try to place your stuff here

 

 

hope this helps

 

juergen

 

--Signature--
Sessions NI-Week 2017 2016
Feedback or kudos are welcome
Message 2 of 2
(2,992 Views)