I saw this for BHO extensions, where JavaScript can call functions in C ++ BHO. But I will say that I do not use BHO, instead I have a C ++ console application that creates an IE COM object as follows:
HRESULT hr = CoCreateInstance( CLSID_InternetExplorer, NULL, CLSCTX_LOCAL_SERVER, IID_IWebBrowser2, (void**)&_cBrowser);
I also have a class that "owns" the IWebBrowser2 object that returns from this function.
class BrowserWrapper{ public: CComPtr<IWebBrowser2> pBrowser; void SomeFunction(...) }
Is there a way to call a function of type SomeFunction in a shell class from JavaScript in the created IWebBrowser2 object?
source share