Internet plugin
"Diogo de Andrade" <[email protected]> Thu, 5 Jun 2008 12:37:52 +0100
| Newsgroups | gmane.games.devel.windows |
|---|---|
| Message-ID | <[email protected]> |
This is a multipart message in MIME format.
--===============0397076865==
Content-Type: multipart/alternative;
boundary="----=_NextPart_000_004A_01C8C708.FA788F90"
Content-Language: pt
This is a multipart message in MIME format.
------=_NextPart_000_004A_01C8C708.FA788F90
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: 7bit
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
------=_NextPart_000_004A_01C8C708.FA788F90
Content-Type: text/html;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
<html xmlns:v=3D"urn:schemas-microsoft-com:vml" =
xmlns:o=3D"urn:schemas-microsoft-com:office:office" =
xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml" =
xmlns=3D"http://www.w3.org/TR/REC-html40">
<head>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Dus-ascii">
<meta name=3DGenerator content=3D"Microsoft Word 12 (filtered medium)">
<style>
<!--
/* Font Definitions */
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri","sans-serif";
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;}
@page Section1
{size:612.0pt 792.0pt;
margin:70.85pt 3.0cm 70.85pt 3.0cm;}
div.Section1
{page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext=3D"edit">
<o:idmap v:ext=3D"edit" data=3D"1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang=3DEN-US link=3Dblue vlink=3Dpurple>
<div class=3DSection1>
<p class=3DMsoNormal>Hi all!<o:p></o:p></p>
<p class=3DMsoNormal><o:p> </o:p></p>
<p class=3DMsoNormal>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)…<o:p></o:p></p>
<p class=3DMsoNormal>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).<o:p></o:p></p>
<p class=3DMsoNormal>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…<o:p></o:p></p>
<p class=3DMsoNormal><o:p> </o:p></p>
<p class=3DMsoNormal>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…<o:p></o:p></p>
<p class=3DMsoNormal>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.<o:p></o:p></p>
<p class=3DMsoNormal><o:p> </o:p></p>
<p class=3DMsoNormal>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…<o:p></o:p></p>
<p class=3DMsoNormal><o:p> </o:p></p>
<p class=3DMsoNormal>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)…<o:p></o:p></p>
<p class=3DMsoNormal>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…<o:p></o:p></p>
<p class=3DMsoNormal>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…<o:p></o:p></p>
<p class=3DMsoNormal><o:p> </o:p></p>
<p class=3DMsoNormal>Anyone has any ideas on this? Even a small sample =
of a
working internet explorer plugin would help a lot!<o:p></o:p></p>
<p class=3DMsoNormal><o:p> </o:p></p>
<p class=3DMsoNormal>Thanks in advance<o:p></o:p></p>
<p class=3DMsoNormal>Diogo de Andrade<o:p></o:p></p>
<p class=3DMsoNormal><o:p> </o:p></p>
</div>
</body>
</html>
------=_NextPart_000_004A_01C8C708.FA788F90--
--===============0397076865==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
--===============0397076865==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
Gamedevlists-windows mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gamedevlists-windows
Archives:
http://sourceforge.net/mailarchive/forum.php?forum_id=555
--===============0397076865==--