Yesterday Jasenko, one of the developers here, noticed that our newest components weren’t working in ‘Safe Mode’. Since Safe Mode simply runs the component in a separate process by specifying CLSCTX_LOCAL_SERVER instead of CLSCTX_INPROC_SERVER this had us all quite confused. This used to work seamlessly. On closer inspection it appears that the default settings generated by Visual Studio 2008 are to blame.
Two extra changes are now required for out of process activation to work:
1. The AppID settings for the library needs to specify the DllSurrogate (leave blank to use the default surrogate process dllhost.exe), e.g.
HKCR { NoRemove AppID { '%APPID%' = s 'MyLib' { val DllSurrogate = s '' } 'MyLib.DLL' { val AppID = s '%APPID%' } } }
2. The component needs to specify the AppID
HKCR { ... default component registration ... NoRemove CLSID { ForceRemove (clsid) = s 'MyObject Class' { val AppID = s '%APPID%' ... rest of class registration... } } }
That’s it.