I'm trying to create a BHO which catches script errors for logging.
Basically, this article describes how to do it:
In short, the BHO implements IOleCommandTarget, and the Exec
method will be called by the browser upon a script error.
But the method is never called (and neither is QueryStatus).
I'm aware of the "disable script debugging" setting in IE, and this is
NOT the cause (I've tested with the setting on and off, and I
furthermore insert script error handling code in the document
which bypasses the setting).
My BHO loads ok, it implements IOleCommandTarget, and when I
QueryInterface the IUnknown parameter I receive in my
IObjectWithSite.SetSite method, it contains IOleCommandTarget.
The strange thing (at least to me) is, this QueryInterface check also
contains IOleCommandTarget when I DON'T implement this interface.
Does anyone see some hint in this which can explain my problem?
Also, is there some special setting in the registry I need to set to make
IE understand that I'm implementing IOleCommandTarget?