locked
Retrieving the COM class factory for component with CLSID(00024500-0000-0000-C000-000000000046) failed due to the following error: 80040154 RRS feed

  • Question

  • Retrieving the COM class factory for component with CLSID(00024500-0000-0000-C000-000000000046) failed due to the following error: 80040154
    Monday, January 20, 2014 11:35 AM

Answers

  • Hello,

    >>Retrieving the COM class factory for component with CLSID(00024500-0000-0000-C000-000000000046) failed due to the following error: 80040154

    What is your application type? C#, VB, WinForm or others? Which COM component are you retrieving? Excel, Word or Others? Please clarify your issue more clearly so that we can help you better.

    And from the error message, it is usually caused by that when we run the .net Code in X64 Environment we will get the following error message.

    E.g. Retrieving the COM class factory for component with CLSID {CA0752B3-021C-4F99-82E3-2C0F19C5E953} failed due to the following error: 80040154."

    WORKAROUND:

    The possible workaround is modify your project's platform from 'Any CPU' to 'X86' (in Project's Properties, Build/Platform's Target)

    ROOTCAUSE

    The Interop is a managed assembly using 32-bit Framework and the dll contains a 32-bit COM object. If we run this COM dll in 64 bit environment, we will get the error message.

    Or please do check as below link to check whether the component has been registered.

    http://social.msdn.microsoft.com/Forums/vstudio/en-US/88a6ea68-f476-4231-822f-27fabe59f458/error-80040154-retreiving-com-class-factory?forum=vbgeneral

    Regards.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Tuesday, January 21, 2014 4:00 AM

All replies

  • Hello,

    >>Retrieving the COM class factory for component with CLSID(00024500-0000-0000-C000-000000000046) failed due to the following error: 80040154

    What is your application type? C#, VB, WinForm or others? Which COM component are you retrieving? Excel, Word or Others? Please clarify your issue more clearly so that we can help you better.

    And from the error message, it is usually caused by that when we run the .net Code in X64 Environment we will get the following error message.

    E.g. Retrieving the COM class factory for component with CLSID {CA0752B3-021C-4F99-82E3-2C0F19C5E953} failed due to the following error: 80040154."

    WORKAROUND:

    The possible workaround is modify your project's platform from 'Any CPU' to 'X86' (in Project's Properties, Build/Platform's Target)

    ROOTCAUSE

    The Interop is a managed assembly using 32-bit Framework and the dll contains a 32-bit COM object. If we run this COM dll in 64 bit environment, we will get the error message.

    Or please do check as below link to check whether the component has been registered.

    http://social.msdn.microsoft.com/Forums/vstudio/en-US/88a6ea68-f476-4231-822f-27fabe59f458/error-80040154-retreiving-com-class-factory?forum=vbgeneral

    Regards.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Tuesday, January 21, 2014 4:00 AM
  • I am getting error
    Retrieving the COM class factory for component with CLSID
     {00024500-0000-0000-C000-000000000046} failed due to the following error: 80040154.
    on creating an excel application instance ie for line

     Microsoft.Office.Interop.Excel.Application excelApp = new Microsoft.Office.Interop.Excel.Application();
    Any suggetions?


    Roopangee Tandon

    Saturday, July 26, 2014 9:06 AM
  • Hi Please make sure that the MS-Office is installed on your system. if it's not installed please install it and restart your machine. And observe it will definitely work.
    Monday, February 20, 2017 11:33 AM