Does BHO work in frame page?

Does BHO work in frame page?

Post by kizm » Thu, 16 Jan 2003 00:39:45



Hi.
I made some BHO that control user's navigation.
It works well in no frame page.
But I found some problem.
If there is some frame in page, my BHO can't change
navigation.
My invoke implementation is below..

HRESULT CUrlChecker::Invoke(DISPID dispidMember, REFIID
riid, LCID lcid,
WORD wFlags,
 DISPPARAMS* pDispParams, VARIANT* pvarResult,
    EXCEPINFO*  pExcepInfo,  UINT* puArgErr)
{
   if (!pDispParams)
      return E_INVALIDARG;

   // before navigate
   if (dispidMember == DISPID_BEFORENAVIGATE2)
   {
    OnBeforeNavigate2(pDispParams);
    m_bDocumentCompleted = true;
   }

   // Quit
   if (dispidMember == DISPID_ONQUIT)
  OnQuit();

   return S_OK;

Quote:}

HRESULT CUrlChecker::OnBeforeNavigate2(DISPPARAMS*
pDispParams)
{
 CComBSTR bstrReqUrl = ((*pDispParams).rgvarg)[5].pvarVal-
Quote:>bstrVal;

 if ((bstrReqUrl == "xxx.xxx.xxx/a.html") ||
  (bstrReqUrl == "http://xxx.xxx.xxx/a.html"))
 {
  CComBSTR bstrURL = "http://xxx.xxx.xxx/b.html";
  CComVariant vtEmpty;
  CComPtr<IWebBrowser2> spBrowser;
  CComPtr<IDispatch> spDisp = ((*pDispParams).rgvarg)
[6].pdispVal;
  spDisp->QueryInterface(IID_IWebBrowser2, (void**)
&spBrowser);
  spBrowser->Stop();
  spBrowser->Navigate(bstrURL, &vtEmpty, &vtEmpty ,
&vtEmpty, &vtEmpty);
  ((*pDispParams).rgvarg)[0].boolVal = FALSE;
 }
 return S_OK;

Quote:}

What I miss?
Thanks.
 
 
 

1. How to make Ins key work with edit control

I need to make an edit control work with the Insert key so that you can
have overstrike typing as well as insert characters depending upon which
mode you are in.

I have tried subclassing the OWL TEdit class and have had some success but
not total.  Does anyone know if there is a standard way to achieve this?
Anyone else ever tried to do this?
--
^ Steven Greco ^           "I've got a real indication of a laugh coming on..."


2. FS98 Multiple Throttle Support

3. How can video standards and frame sizes be iterated (well) for a property page?

4. Zoom V.32bis VFP problem.

5. Page Frame Database

6. 2216 phones locking up

7. Get the URL from a framed page

8. Works 2000 wont install

9. Link to Page Within Frame

10. Print preview without frame work architecture

11. 4 MVP ..? :SetSite on BHO\DeskBand

12. BHO (browser help object) only one allowed on IE 5?

13. BHO cannot register in win98, me