COM object of type Class to type Application, error loading library

1.1k views Asked by At

So I'm not entirely sure how to go about asking this so I'll list my trouble shooting along with the error I'm getting.

For reference, my program only works with 32-bit versions of Excel. I mistakenly had 2016 64-bit installed so I removed and re-installed 32-bit Excel. That works fine and it appears that the registry is correct. Everything is listed as 1.9 (and win32) which points to 2016. I don't see any reference to a difference between 32/64 bit in the registry.

Unable to cast COM object of type 'Microsoft.Office.Interop.Excel.ApplicationClass' to interface type 'Microsoft.Office.Interop.Excel._Application'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{000208D5-0000-0000-C000-000000000046}' failed due to the following error: Error loading type library/DLL. (Exception from HRESULT: 0x80029C4A (TYPE_E_CANTLOADLIBRARY)).</error

According to my error message it's looking like I have a couple of issues:

  • Possible errors in the registry, but I only have 1.9 under TypeLib (00020813-0000-0000-c000-000000000046) and it's listed as win32. Pretty sure this isn't it
  • My custom DLL isn't registered. More likely, but maybe I'm missing another DLL
  • Tried the full DLL itself, but it gave me this error when I tried using regsvr32 (in SySWOW64). Does this mean I need a different DLL registered? Should it be listed in the DLL that I can see once it's decompiled?

"The module "Cutsom.dll" was loaded but the entry-point DllRegisterServer was not found.

I used a decompiler to see that 000208D5-0000-0000-C000-000000000046 is referenced in several libraries of the build, especially the Application and _Application parts. Did Office 2016 also change how Boolean values are treated? Do I just need to swap the interop around?

What other resources could I use to learn more about these COM types and DLL libraries?

Thanks!

0

There are 0 answers