When creating an instance of a COM Interop object:
var comObj = new ComComponentClass();
I get COMException:
Retrieving the COM class factory for component with CLSID
{C343ED84-A129-11D3-B799-0060B0F159EF} failed due to the following error:
80040154 Class not registered
(Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)).
I only get this error when starting the application with Run as administrator . When I start normally, an error does not occur.
Notes:
- The application is a 64-bit application.
- The COM component is an inproc server in a 64-bit dll.
Any ideas on where I should start researching why this difference occurs?
What I tried:
I used Procmon to see which registry keys are checked.
- In both cases, the corresponding dll is found by checking the key
HKCU\Software\Classes\CLSID\{C343ED84-A129-11d3-B799-0060B0F159EF}\InprocServer32 HKCR\CLSID\{C343ED84-A129-11D3-B799-0060B0F159EF} NAME NOT FOUND. ( , regedit.exe. , .