[GD-Windows] Internet plugin
Brought to you by:
vexxed72
From: Diogo de A. <dio...@ne...> - 2008-06-05 11:37:57
|
Hi all! I'm trying to build an Internet Explorer plug-in that displays what in practice is a window to my game engine. I got this working using MFCs with relative ease, but when I static link the MFCs (so that the user of the plugin doesn't have to go fetch 10000 updates and installation packs), the plugin size climbs to 6 Mbs, which I think it's too big (we all know what a space hog MFCs are). So I decided to try to build an ActiveX control from scratch and implement what I needed from scratch (knowing ofc that it envolves a lot of work). I built and registered an ActiveX control, that (for test purposes, since documentation on this kind of approach seems to be limited to MFCs) implemented IUnknown and IDispatch. First problem I came to was that the registering of the control didn't make it appear on the "Insert Control" list on the Active X Control Test Container, where I was supposed to make my tests. I solved that one by copying (again, for test purposes) the registry keys generated by the MFC version of my plugin, changing what was needed to reference my new control. Then, the real problem started: when I use the Active X Control Test Container and insert my control, the OCX I built gets called, my COM object is created, it's interfaces are queried both for IUnknown and IDispatch, and then (weirdly enough), it gets released (reference count goes to zero). After that, the Active X Control Test Container crashes somewhere trying to dispatch some message to some window that's set to NULL. Honestly, I can think of a bazillion things that go wrong, but I really don't know where to start. documentation on this kind of "manual" ActiveX controls is almost non-existent (at least, I can't seem to find it anywhere). My first guess was that my dispatch interface was badly built, but the IDispatch members aren't even called before the object is released, so it shouldn't be that. The fact that the Control Test Container is trying to access a NULL window makes me guess that he's probably trying to access the window that my object should have binded itself with or something, but again, I can't find no information. Anyone has any ideas on this? Even a small sample of a working internet explorer plugin would help a lot! Thanks in advance Diogo de Andrade |