2

I have some COM .dlls written in C++ that I have registered via regsvr32. The machine in question is a 32-bit machine and the .dlls themselves are also all 32-bit.

In the C# Visual Studio, I add a reference to the COM application, and try to create one of the defined coclasses. However, I get the following error message when I try to run.

Creating an instance of the COM component with CLSID {125F6114-3444-41B0-A5CC-7333EAA8020A} from the IClassFactory failed due to the following error: 80040154.

I look up that CLSID in the registry and find it in all the right places. How can I fail to create the COM component if even Visual Studio can find it?

Jainathan Leung
  • 1,147
  • 2
  • 15
  • 27
  • Did you try doing what http://stackoverflow.com/questions/1036856/retrieving-the-com-class-factory-for-component-with-clsid-xxxx-failed-due-to-t says? here's a link with screenshots > http://softwaredevelopmentforecm.wordpress.com/2009/12/16/failed-due-to-the-following-error-80040154/ – banging Aug 03 '12 at 18:28
  • Use SysInternals' ProcMon to see where your app looks in the registry. – Hans Passant Aug 03 '12 at 19:21

1 Answers1

0

I had the same problem and nothing worked until I tried running Visual Studio as administrator.

Gerardo Contijoch
  • 2,421
  • 5
  • 20
  • 29