How to use Mozilla ActiveX Control without registry
- by Andrew McKinlay
I've been using the IE Browser component that is part of Windows. But I'm running into problems with security settings. For example, users get security warnings on pages with Javascript.
So I'm looking at using the Mozilla ActiveX control instead. It's especially nice because it has a compatible interface. It works well if I let it install the control in the registry. But my users don't always have administrator rights to install things in the registry. So I'm trying to figure out how to use the control without registry changes.
I'm using DllGetClassObject to get the class factory (IID_ICLASSFACTORY) and then CoRegisterClassObject to register it. All the API calls appear to succeed. And when I create an AtlAxWin window with the CLSID, it also appears to work. But when I try to call Navigate on the AtlAxGetControl it doesn't work - the interface doesn't have Navigate.
I would show the code but it's in an obscure language (Suneido) so it wouldn't mean much. An example in C or C++ would be easy for me to translate. Or an example in another dynamic language like Python or Ruby might be helpful.
Obviously I'm doing something wrong. Maybe I'm passing the wrong thing to CoRegisterClassObject? The MSDN documentation isn't very clear on what to pass and I haven't found any good examples.
Or if there is another approach, I'm ok with that too. Note: I'm using the AtlAxWin window class so I'm not directly creating the control and can't use this approach.
Another option is registry free com with a manifest. But again, I couldn't find a good example, especially since I'm not using Visual Studio. I tried to use the MT manifest tool, but couldn't figure it out.
I don't think I can use DLL redirection since that doesn't get around the registry issue AFAIK.
Another possibility is using WebKit but it seems even harder to use.