I am trying to call a BHO object method from a javascript function (the javascript is injected by the BHO using IHTMLWindow2 execScript).
function foo()
{
IEBHO.DoSomething();
}
The IEBHO is a BHO object and loaded in IE9 already.
And the "DoSomething" interface/method is declared in IDL file of BHO project as:
[id(1), helpstring("method DoSomething")] HRESULT DoSomething();
This approach works fine with IE7 and IE8 perfectly. The method/interface "DoSomething" gets called from the javascript function successfully.
However in IE9, it seems to fail always. The javascript seems to fail to find the IEBHO object in its namespace, which results failure of calling the "DoSomething" method.
I even used the IE7/IE8 Document Mode inside IE9 and they all works fine, but as soon as it is set to the default IE9 document mode, it fails.
Is this a BUG in IE9? or there is a new way do accessing the BHO method?
Please help...
Best regards,
Frank