See the question and my original answer on StackOverflow

0x80040154 or REGDB_E_CLASSNOTREG "Class not registered" error is a very common error indicating a COM object registration issue. COM basically tells you it cannot find the object you're looking for.

In todays world, it's, most of the time, a x86/x64 mismatch: the client and the server (when it's an in-process DLL) are not compiled with the same bitness.

If using .NET as the .DLL (in-process server), you also want to make sure you've registered it using RegAsm /codebase, at least during dev/test phases.