From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Retrieving the COM class factory for component with CLSID {B2794EF6-C0B6-11D0-939C-0020AF68E893} failed due to the following error: 80040154 Class not

Solved!
Go to solution

Hello all,

i am trying to interact from c# wpf with the TestStand engine.

 

when i run the line:

m_Engine = new Engine();// lets get an new Engine Object

 

i get this error:

Retrieving the COM class factory for component with CLSID {B2794EF6-C0B6-11D0-939C-0020AF68E893} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)).

 

i have TestStand 2019 32bit on Windows7 64bit.

 

in the registry i found this guid as related to  TestStand2019\bin\teapi.dll
i tried to register teapi.dll with regsvr32 and it gives a "registration succeeded" message - but even after that, i get the same "class not registered" error
 
i tried to register TestStand 2019\API\DotNET\Assemblies\CurrentVersion\NationalInstruments.TestStand.Interop.API.dll but getting a message that it does not contain dllregister (meaning that its not a com object).
i did succeed registering it with regasm (that registers c#  and interop dlls) but even after that, i still get the "class not registered" exception

 

so am i trying to register the wrong thing?

 

please advise

Thanks in advance

Lior Meister 

0 Kudos
Message 1 of 7
(11,003 Views)

Is your application's platform set to 32-bit (x86) ? If you don't install 64-bit TestStand, then you probably need to do that.

0 Kudos
Message 2 of 7
(10,977 Views)

Thank you for ypur answer.

 

Yes. My c# (.net) application is set to x86 (32 bit).

 

Should i install TestStand in its 64bit vesion?

 

Regards

Lior Meister

0 Kudos
Message 3 of 7
(10,965 Views)
Solution
Accepted by topic author lior.meister

You could try that, but it seems like a long shot since your app didn't work as 32-bit.

 

Do the example C# user interfaces from your 32-bit install launch ok? If not, you should reinstall TestStand. If so, then there is something different about your app.

0 Kudos
Message 4 of 7
(10,960 Views)

hi,

i fixed both the solution and projects to be x86 and now it works fine!

 

thank you very much

Lior Meister

0 Kudos
Message 5 of 7
(10,926 Views)

even i am getting the same error in WINDOWS FORMS Application
tried so many alternatives

but still getting the same error

 

0 Kudos
Message 6 of 7
(2,833 Views)

What version of Teststand and Visual Studio did you use?

Usually, for Teststand2017, 2019, 2020, 2021, 2022, I suggest that you can try to use Visual Studio 2017 to open the demo and choose the correct architecture version (x86 or x64), which will ensure that you can open it correctly and compile without any errors.

0 Kudos
Message 7 of 7
(2,784 Views)