Article View: borland.public.cppbuilder.nativeapi
Article #3929Re: API to detect which URL is open in Internet Explorer
From: Remy Lebeau (TeamB)
Date: Wed, 19 Apr 2006 17:30
Date: Wed, 19 Apr 2006 17:30
38 lines
2357 bytes
2357 bytes
"Thorsten Meyer" <meyer.t@hhb.bonn.de> wrote in message
news:44465d36@newsgroups.borland.com...
> is there any way to detect with Windows API or VCL Komponent
> 1. if one or more Instances of Internet Explorer (IEXPLORE.EXE) is running
There is nothing available for querying that directly. You will have to
track the instances manually.
> 2. which URL's is actualy open (used) in the possible Instances of the
Internet Explorer
For that, you have to actually connect to each IE browser window and query
its current URL from its DOM interfaces directly. Specifically from the
IWebBrowser2 interface, which has a LocationURL property.
For both of these, I would suggest writing a Browse Helper Object. Then you
can install it into IE, and IE will load it automatically. When loaded, it
can communicate back to your main application as needed so that it knows
when IE is running, how many times the BHO is loaded, and to receive
notifications whenever the URL changes in a browser instance.
Refer to MSDN for more details:
Browser Helper Objects: The Browser the Way You Want It
http://msdn.microsoft.com/library/en-us/dnwebgen/html/bho.asp
WebBrowser Control
http://msdn.microsoft.com/workshop/browser/webbrowser/browser_control_node_entry.asp
Interfaces and Scripting Objects
http://msdn.microsoft.com/workshop/browser/mshtml/reference/ifaces/interface.asp
Gambit
Technical Details
Message-ID:
<4446769f$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<44465d36@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,49a04f82ae43f13c X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Remy Lebeau \(TeamB\)" <no.spam@no.spam.com> Newsgroups: borland.public.cppbuilder.nativeapi References: <44465d36@newsgroups.borland.com> Subject: Re: API to detect which URL is open in Internet Explorer Date: Wed, 19 Apr 2006 10:30:28 -0700 Lines: 40 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 NNTP-Posting-Host: 68.69.17.41 Message-ID: <4446769f$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1145468575 68.69.17.41 (19 Apr 2006 10:42:55 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail