
ATL COM Component firing events into VBScript event sink
Hi,
I've been pulling my hair out all day - trying to get a basic event to fire
from a ATL component into a VBScript event sink in Internet Explorer.
I have created a new ATL COM Component using the wizard, and checked the
"Support Connection Points" option. I've then added a method to the
xxxxEvents interface that it creates (This will be the event).
I've then rebuilt the project (to generate the TLB) and gone to the
Implement Connection points dialog and a proxy class has been created,
complete with the Fire_xxxx method.
I've then created a method on the main Interface that calls this Fire_xxxx
method. When I call this method from Visual Basic the event fires fine,
whilst in VBScript it doesn't. I've added tracing to the Fire_xxx method
and it get's called but there are no connections registered so the event is
never fired.
I've also added the implementation for IProvideClassInfo by using the
IProvideClassInfo2Impl template.
See ( Q200839 - HOWTO: Enable ActiveX Control Event Handling on a Web Page )
And yet it still doesn't work in VBScript within IE!!! - Anyone got any
ideas, I've trawled the normal sources but to no avail!
The VBScript source is included at the end of the message...
Thanks in advance - Can you copy any replies to my email as well as here
please?
Regards,
Darren
<html>
<head>
</head>
<body>
<object id=events classid=CLSID:CC872497-2D2B-4812-BEFD-CE4E30E80A07
width="14" height="14"></object>
<script language="VBScript">
Sub events_AnEvent
msgbox "Got Event"
End Sub
</script>
<script language="VBScript">
events.DoIt
</script>
</body>
</html>
--
Darren Jefford