From: Robert Crandal on
What are the preferred API's for checking if Internet Explorer
is currently running and for getting a "HANDLE" to the IE explorer
application???

I just want to obtain a handle to the IE app so I can play with
sending messages to the actual IE application.

Thank you!


From: Vincent Fatica on
On Fri, 18 Sep 2009 16:53:10 -0700, "Robert Crandal" <nobody(a)gmail.com> wrote:

|What are the preferred API's for checking if Internet Explorer
|is currently running and for getting a "HANDLE" to the IE explorer
|application???
|
|I just want to obtain a handle to the IE app so I can play with
|sending messages to the actual IE application.

You can EnumProcesses() ... OpenProcess() on each one, looking, with
GetModuleBaseName(), for "iexplore.exe". If you find it, you'll already have a
HANDLE (from OpenProcess()) to the process. That HANDLE won't help you send
messages, but the strategy will tell you if IE is running.

You can FindWindow[Ex]() looking for a particular window to which you want to
send messages. You can investigate IE's windows with the Spy++ utility (from MS
Visual Studio).
--
- Vince
From: Alf P. Steinbach on
* Robert Crandal:
> What are the preferred API's for checking if Internet Explorer
> is currently running and for getting a "HANDLE" to the IE explorer
> application???
>
> I just want to obtain a handle to the IE app so I can play with
> sending messages to the actual IE application.

You check whether it's in the running object table. In VB that's GetObject.
Check what the corresponding API function is.

Cheers & hth.,

- Alf
From: Christian ASTOR on
On 19 sep, 01:53, "Robert Crandal" <nob...(a)gmail.com> wrote:
> What are the preferred API's for checking if Internet Explorer
> is currently running and for getting a "HANDLE" to the IE explorer
> application???
> I just want to obtain a handle to the IE app so I can play with
> sending messages to the actual IE application.

"a handle to the IE app" has no really meaning : IE can have several
opened windows.
There are several ways to find IE windows : WinList_GetShellWindows()
or IShellWindows, EnumWindows() and test "IEFrame" class, ...
(GetActiveObject() doesn't work as IE is not registered in the ROT, at
least on my PC (XP) and without BHO (KB F18484)...
From: Jerry Coffin on
In article <H3Vsm.199082$0e4.25535(a)newsfe19.iad>, nobody(a)gmail.com
says...
>
> What are the preferred API's for checking if Internet Explorer
> is currently running and for getting a "HANDLE" to the IE explorer
> application???
>
> I just want to obtain a handle to the IE app so I can play with
> sending messages to the actual IE application.

Why? If a user has set a different default browser, you should
respect that.

--
Later,
Jerry.