fryme
fryme

Reputation: 321

Can't get IID_WebBrowser2 on windows

I have this code and it not works:

template <const GUID* pFbCLSID, const char* pMT, class ICurObjInt,
    const IID* piid, const GUID* plibid>
STDMETHODIMP CFBControl<pFbCLSID, pMT,ICurObjInt,piid,plibid>::SetClientSite(
    IOleClientSite *pClientSite )
{
    HRESULT hr = IOleObjectImpl<CFBControlX>::SetClientSite (pClientSite);
    if (!pClientSite || !pluginMain) {
        shutdown();
        return hr;
    }

    m_serviceProvider = pClientSite;
    if (!m_serviceProvider)
        return E_FAIL;
    // HERE QueryService() return E_NOINTERFACE
    m_serviceProvider->QueryService(SID_SWebBrowserApp, IID_IWebBrowser2,
        reinterpret_cast<void**>(&m_webBrowser));
    m_serviceProvider.Release();
}

QueryService() returns E_NOINTERFACE. It is a firebreath (www.firebreath.org) plugin for IE and it loads dynamically. When DWebBrowserEvents2::OnDocumentComplete2() event is raised in my BHO I am inserting JS object of plugin and it calls the code above.

In my BHO I have the same code when I am subscribing to events and it works fine.

Upvotes: 4

Views: 276

Answers (0)

Related Questions