title: IWebBrowser2 and Chrome Plugin for Internet Explorer
body: <p>I am trying to get access to the IWebBrowser2 object from Internet Explorer 8 with the chrome plugin.  I am able to access it when the chrome plugin isn't installed, but it doesn't work due to the class names etc different.  </p>
  
  <p>Without chrome plugin I can use:</p>
  
  <pre><code>function GetIEFromHWND(WHandle: HWND; var IE: IWebbrowser2): HRESULT;
  var
    hInst: HWND;
    lRes: Cardinal;
    MSG: Integer;
    pDoc: IHTMLDocument2;
    ObjectFromLresult: TObjectFromLresult;
  begin
    Result := 0;
    hInst := LoadLibrary('Oleacc.dll');
    @ObjectFromLresult := GetProcAddress(hInst, 'ObjectFromLresult');
    if @ObjectFromLresult &lt;&gt; nil then begin
      try
        MSG := RegisterWindowMessage('WM_HTML_GETOBJECT');
        SendMessageTimeOut(WHandle, MSG, 0, 0, SMTO_ABORTIFHUNG, 1000, lRes);
        Result := ObjectFromLresult(lRes, IHTMLDocument2, 0, pDoc);
        if Result = S_OK then
          (pDoc.parentWindow as IServiceProvider).QueryService(IWebbrowserApp, IWebbrowser2, IE);
      finally
        FreeLibrary(hInst);
      end;
    end;
  end;
  </code></pre>
  
  <p>This doesn't work (I'm presuming) because there's no IHTMLDocument2 interface (using MS Spy++ you can see that the window heirarachy is completely different).</p>
  
  <p>I can access the instance of the "Tab" that I'm after, but ultimately I need to "refresh" that tab with a new URL (which I was going to use IWebBrowser2.Navigate to accomplish).</p>
  
  <p>I've tried importing the type library for Chrome but I can't find anything in there to help either.  So I'm happy to utilise whatever I need to, in order to refresh tab that I have the handle to.</p>
  
  <p>Thanks</p>