Fetching a factory COM class for a component with CLSID {6C9E80E3-B780-4361-A693- 602C6BDC83A9} failed due to the following error: 80040154

I get this error:
Fetching the factory COM class for a component with CLSID {6C9E80E3-B780-4361-A693- 602C6BDC83A9} failed due to the following error: 80040154.

Dim smgrGlobal As QBSessionManager smgrGlobal = New QBSessionManagerClass() 

The second line is an error.
I get this error only with QB2013 and QBFC12. This does not happen with previous versions.
As far as I can find, this error occurs because the application does not compile for x86 (if “Any processor” was used instead.) However, I installed my compilation application for x86 NOT “Any processor”, and I'm still getting this mistake.

+4
source share
3 answers

COM error 0x80040154 literally means "class not registered." The class in question refers to the COM class for the component you are trying to create. Here are the reasons why you might get this error:

  • As you noted, if you create an application using "x64" or "Any CPU" instead of "x86", you will see this problem. This is due to the fact that 32-bit processes use a different registry hive than 64-bit processes, and the registry stores information about the registration of the COM class.
  • You incorrectly installed QBFC on the current local machine. Regardless of the version of QBFC that you used to develop your application, you must install the same version of QBFC on every computer on which your application runs. If you do not, you are lucky because someone else has installed the correct version, but in the end you will see this problem. We emphasize: QBFC is not installed with QuickBooks by default.
  • (less likely, but possible). Somehow, COM registration information for QBFC appeared. This issue can be resolved by reinstalling the correct version of QBFC.
+5
source

I have a similar problem with QB POS 2013.

I get this error when starting the application with administrator credentials - when I run the application under the current user, everything is fine. The cause of this error may be a problem in the QBFC installer (or in the merge module) - both installers represent the class identifier of the COM component in the current user registry branch (HKCU) instead in the local machine branch (HKLM). So, when you launch your application not under the current user (administrator or other user), the application cannot find the identifier of the COM component.

In addition, regular QB XML (Interop.QBPOSXMLRPLIB) is installed correctly and runs successfully under all users.

See a similar discussion here - How can I half-register a COM component? .

0
source

If switching to X86 does not work, try this: I am using Version 13, it may work for other versions Install QBFC13_0Installer.exe Make sure that you first installed the SDK On my system, this is under: C: \ Program Files (x86) \ Intuit \ IDN \ QBSDK13.0 \ tools \ installers

I have two identical Surface Pro 3s with Windows 10. Using an identical copy of the code on the same system, compiled and executed just fine. On the other hand, I get a terrible class error. After a long search and not finding a solution, I started just taking punches in the dark, and this particular blow fixed the problem.

0
source

All Articles