Where is my COM Component?
I'm desperately trying to get a managed BHO to interop with my IE Broker. The Broker should be a Remoting server that runs and medium MIC level so that it can make changes that the managed BHO can't make because it is running in Protected Mode IE at low MIC level. At first I spent a good deal of time, trying to do this all in C#. This document describes how to lower MIC level on resources such as named pipes (remoting IPC protocol). Some of the Security APIs mentioned are not available in the managed world yet. And since my PInvoke skills are lacking, I was going for COM/Interop. I wrote a little ATL component, copied the code over and wanted to call it from my remoting server. Not so fast.
However hard I tried, the remoting server could not instantiate the COM component. I kept getting this:
Retrieving the COM class factory for component with CLSID {15D665F5-DFDE-4F73-B4EA-56C7C7318A36} failed due to the following error: 80040154.
Press any key to continue . . .
Could it be that the class was not registered? Looking up the ProgID, it was there. Might it be that quirky COM UAC thing? Uh-uh. Elevated, non-elevated, same thing. ProcMon to the rescue. Hmm! CLSID not found. Whaatt? Raw registry search for the CLSID. Ah! Wow6432.
When compiling my remoting server, it was compiled in mixed mode. This meant it was going for x64 on my x64 bit Vista. My COM component was still x86. So SCM was not looking for x86. After some fiddling around with the build settings, I was able to fix it.