Article View: borland.public.cppbuilder.nativeapi
Article #11473Re: Remy please help...BHO question...again
From: Martin C
Date: Thu, 12 Feb 2004 19:28
Date: Thu, 12 Feb 2004 19:28
48 lines
2673 bytes
2673 bytes
Hi Remy,
I think I found a solution for the White List problem, I have tried it in my
BHO project and tested it on couple of sites and so far it works fine for
me, please find the code below and please let me know if it also worked for
you..
case DISPID_NEWWINDOW2:
{
if (!m_bUserClickedLink)
{
CComBSTR bsUrl;
HRESULT hr =
m_spWebBrowser2->get_LocationURL(&bsUrl);
if (SUCCEEDED(hr) && bsUrl.Length() > 0)
{
if(CompareUrlWithWhiteList(bsUrl))
{ // URL was found in the white list no
action need to be taken...
}
else
{ // Not found...eliminate the popup
before it appear.
*(pDispParams->rgvarg[0].pboolVal) =
VARIANT_TRUE;
}
}
}
else { }
m_bUserClickedLink = FALSE; // Reset
break;
}
Best Regards
"Remy Lebeau (TeamB)" <gambit47.no.spam@no.spam.yahoo.com> wrote in message
news:402c33b0@newsgroups.borland.com...
>
> Of course, this solution doesn't help you with your white-list feature,
but
> it does help my BHO since it does full-time blocking regardless of site.
>
>
> Gambit
>
>
Technical Details
Message-ID:
<402c3691$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<402c0c73$1@newsgroups.borland.com> <402c1587$1@newsgroups.borland.com> <402c193c@newsgroups.borland.com> <402c26b0$1@newsgroups.borland.com> <402c33b0@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,d7cd5f398672172c X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2004-02-12 18:39:52 PST From: "Martin C" <martinc@aol.com> Newsgroups: borland.public.cppbuilder.nativeapi References: <402c0c73$1@newsgroups.borland.com> <402c1587$1@newsgroups.borland.com> <402c193c@newsgroups.borland.com> <402c26b0$1@newsgroups.borland.com> <402c33b0@newsgroups.borland.com> Subject: Re: Remy please help...BHO question...again Date: Thu, 12 Feb 2004 21:28:06 +0200 Lines: 50 Organization: V Safe X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 NNTP-Posting-Host: 81.10.4.238 Message-ID: <402c3691$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1076639377 81.10.4.238 (12 Feb 2004 18:29:37 -0800) Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail