New ActiveXObject()  
Author Message
koko





PostPosted: Internet Explorer Web Development, New ActiveXObject() Top

Hi,

I'm trying to instantiate an activex object from javascript from 2 different browsers and everything works fine.
Now I want the 2 browsers to share the same activex object as one of the browsers will invoke some methods and the other will listen to some events.

I created an ActiveX EXE in VB 6 just to prove the concept and set the class instantiation to MultiUse but it seems that the browsers  have different instances.

This is the pseudo-code
Browser1

<script language=jscript>
var obj = new ActiveXObject("Bridge.Communicator");
obj.CallMethod("test");
</script>

Browser2

<Script language=jscript>
var obj = new ActiveXObject("Bridge.Communicator");
</script>

<Script language=jscript>
function obj::Event()
{

//handle the event raised by CallMethod method called in browser1

}
</script>

If I put the code in the same html it works but not when it is in different browsers. What am I missing

Thanks,
Koko




Internet Explorer Development8  
 
 
EricLaw-MSFT





PostPosted: Internet Explorer Web Development, New ActiveXObject() Top

You should probably ask this question over here: http://forums.microsoft.com/MSDN/ShowForum.aspx ForumID=924&SiteID=1

In general, I wouldn't expect your approach to work. It would work if your Bridge.Communicator objects looked up a synchronization object in the Running Objects Table and attached to that object. http://www.codeguru.com/cpp/com-tech/atl/misc/article.php/c7387/