Click here to Skip to main content
15,891,136 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Getting System.Runtime.InteropServices.COMException when using
'TDConnection qctd = new TDConnection()'.
Any help in fixing this is appreciated.

What I have tried:

Getting System.Runtime.InteropServices.COMException when using
'TDConnection qctd = new TDConnection()'.
Any help in fixing this is appreciated.
Posted
Updated 8-May-20 3:19am
Comments
Richard MacCutchan 8-May-20 4:46am    
What exception?
Member 14824395 8-May-20 8:41am    
Hello,

I am getting
System.Runtime.InteropServices.COMException:'Retrieving the COM class factory for
component with CLSID {C5CBD7B2-490C-45F5-8C40-B8C3D108E6D7} failed due to the following error:80040154 Class not registered (Exception from HRESULT:0x80040154(REGDB_E_CLASSNOTREG)}

Thank you.
Suneel.
Richard MacCutchan 8-May-20 8:50am    
You need to check that you have registered the component correctly.
Member 14824395 8-May-20 8:53am    
How to check that it is registered correctly?
Richard MacCutchan 8-May-20 9:12am    
I assume you installed this product so you should be able to check that it was installed correctly. Otherwise look in the registry at the HKEY_CLASSES_ROOT\CLSID node for that GUID.

1 solution

Comment:
Hi,
COM dll is 32 bit and my solution is 64 bit. Could you please let me know is it an issue? If Yes,please let me know how to fix it.
The easiest way to do this would be to make your application 32 bit.
An alternative if you had access to the source code would be to recompile into a 64 bit version
Comment:
Hello,
I am getting
System.Runtime.InteropServices.COMException:'Retrieving the COM class factory for
component with CLSID {C5CBD7B2-490C-45F5-8C40-B8C3D108E6D7} failed due to the following error:80040154 Class not registered (Exception from HRESULT:0x80040154(REGDB_E_CLASSNOTREG)}
The registration of COM components basically means that references are added to a list within the Windows Registry.

There are separate lists for 32 bit and 64 bit COM objects. When you install and register a 32 bit DLL it will go into the 32 bit list.
When a 64 bit application looks for COM objects, it will look in the 64 bit list.
Hence... the error.
As previously stated, the best choices are to either use a 64 bit version of the DLL or make your application 32 bit.

There are some hacks out there on copying the registry entries... which may be fine locally but can be a nightmare if this application has to be deployed on several machines
 
Share this answer
 
Comments
Member 14824395 8-May-20 10:33am    
Thank you for the explanation. Could you please let me know how to make my application as 32 bit?
MadMyche 8-May-20 10:58am    
This is a setting in the IDE that you are using to develop your application.
MS Docs => How to: Configure projects to target platforms[^]
Member 14824395 12-May-20 3:03am    
Hi,

I did make my application as 32 bit and ran. Now I am getting below error in the log. Could you please help?

Name Value
Connected The function evaluation requires all threads to run.
TestSetFactory The function evaluation requires all threads to run.

Thank you.
Member 14824395 12-May-20 3:03am    
Hi,

I did make my application as 32 bit and ran. Now I am getting below error in the log. Could you please help?

Name Value
Connected The function evaluation requires all threads to run.
TestSetFactory The function evaluation requires all threads to run.

Thank you.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900