Hi guys,
I have been looking for a way to register my script to handle events fired by a COM object.
In HTML JavaScript this is quite simple and there are many ways to do this. I expected that something like this would work:
code:
var SomeObject = new ActiveXObject("AppID.ClsID");
SomeObject.OnSomeEvent = EventHandlerFunc;
...
function EventHandlerFunc(EvtParam1)
{
}
but that doesn't work. I also tried using the GetRef function and some other methods. This article seemed to give some good pointers. Maybe this will inspire somebody.
http://msdn2.microsoft.com/en-us/library/ms974564.aspx
I think out of all the methods the ConnectObject() function seems the right way to go. I have a feeling that something similar is used for MsgPlus events due to the automagic-like function names. The bummer is that I cannot find a way to call this function.
Any ideas?