|
|
|
date: Wed, 27 Feb 2008 12:18:55 +0800,
group: microsoft.public.inetsdk.programming.webbrowser_ctl
back
about webbrowser url monitor
hi,
I have googled IInternetProtocol for hours, still haven't clear clue for
webbrowser url monitor. my situation:
1) I want to monitor all the urls the webbrowser control visited(eg.
htmls, gifs, css', swf, mp3s, flvs);
2) My app is an MFC project, uses CHtmlView;
My problem is:
1) When I use VC2005's class wizard to add IInternetProtocol interface
to my ATL object, it said there is no type library info in file:
C:\windows\system32\urlmon.dll ?!!! Where the IInternetProtocol interface
is?
2) So I have to write my IInternetProtocol interface manually, the
simplest way:
class ATL_NO_VTABLE CMyUrlMon : public IInternetProtocol {
CMyUrlMon();
//IInternetProtocol methods eg:Read, Seek,...
//IInternetProtocolRoot methods eg: Start, Continue, Abort,...
};
question:
a) how to replace the original interface with my new
IInternetProtocol interface only in my app?
After my app exit, or HANGED(no chance to change registry when
hanged), I hope IE could use the original IInternetProtocol interface;
b) in my CMyUrlMon::Start() method, know can I call the original
IInternetProtocol::Start?
As I just monitor, after get the urls, I should call the original
IInternetProtocol::Start, otherwise I don't know how to implement these
methods.
Thanks for any idea,
BigSmith
date: Wed, 27 Feb 2008 12:18:55 +0800
author: Big Smith
Re: about webbrowser url monitor
"Big Smith" wrote in message
news:eTENfePeIHA.4464@TK2MSFTNGP02.phx.gbl
> I have googled IInternetProtocol for hours, still haven't clear
> clue for webbrowser url monitor.
See if this helps:
http://groups.google.com/group/microsoft.public.inetsdk.programming.mshtml_hosting/msg/76bf4910a289d4b3
> My problem is:
> 1) When I use VC2005's class wizard to add IInternetProtocol
> interface to my ATL object, it said there is no type library info in
> file: C:\windows\system32\urlmon.dll ?!!! Where the IInternetProtocol
> interface is?
In urlmon.h. It's not an automation-compatible interface, and is not
described in any type library. The wizard can't handle it, you have to
do it the old-fashioned way - using your head, your fingers and your
trusty keyboard.
> a) how to replace the original interface with my new
> IInternetProtocol interface only in my app?
IInternetSession::RegisterNameSpace
> b) in my CMyUrlMon::Start() method, know can I call the
> original IInternetProtocol::Start?
Are you asking how to call a method of a COM interface? I don't quite
understand the problem.
--
With best wishes,
Igor Tandetnik
With sufficient thrust, pigs fly just fine. However, this is not
necessarily a good idea. It is hard to be sure where they are going to
land, and it could be dangerous sitting under them as they fly
overhead. -- RFC 1925
date: Tue, 26 Feb 2008 23:26:10 -0500
author: Igor Tandetnik
Re: about webbrowser url monitor
Hi Igor,
Thanks a lot, I biuld your sample and it works great!
but next question comes:
How to distinguish the requests if I have two webbrowser control?
BigSmith
"Igor Tandetnik"
:eiGTjjPeIHA.4196@TK2MSFTNGP04.phx.gbl...
> "Big Smith" wrote in message
> news:eTENfePeIHA.4464@TK2MSFTNGP02.phx.gbl
>> I have googled IInternetProtocol for hours, still haven't clear
>> clue for webbrowser url monitor.
>
> See if this helps:
>
> http://groups.google.com/group/microsoft.public.inetsdk.programming.mshtml_hosting/msg/76bf4910a289d4b3
>
>> My problem is:
>> 1) When I use VC2005's class wizard to add IInternetProtocol
>> interface to my ATL object, it said there is no type library info in
>> file: C:\windows\system32\urlmon.dll ?!!! Where the IInternetProtocol
>> interface is?
>
> In urlmon.h. It's not an automation-compatible interface, and is not
> described in any type library. The wizard can't handle it, you have to do
> it the old-fashioned way - using your head, your fingers and your trusty
> keyboard.
>
>> a) how to replace the original interface with my new
>> IInternetProtocol interface only in my app?
>
> IInternetSession::RegisterNameSpace
>
>> b) in my CMyUrlMon::Start() method, know can I call the original
>> IInternetProtocol::Start?
>
> Are you asking how to call a method of a COM interface? I don't quite
> understand the problem.
> --
> With best wishes,
> Igor Tandetnik
>
> With sufficient thrust, pigs fly just fine. However, this is not
> necessarily a good idea. It is hard to be sure where they are going to
> land, and it could be dangerous sitting under them as they fly
> overhead. -- RFC 1925
>
date: Thu, 28 Feb 2008 01:09:20 +0800
author: Big Smith
|
|