473,511 Members | 16,252 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Internet Explorer Automation

Hi,

I have a application that I need to create multiple new "iexplore.exe"
processes (show more than once in taskmanger) and control them using the
shdocvw/mshtml.

I am able control Internet Explorer with instances created with the shdocvw.
e.g.
Activator.CreateInstance(Type.GetTypeFromProgID
("InternetExplorer.Application");

And I am able to create the new "iexplore.exe" processes. e.g.
System.Diagnostics.Process.Start("iexplore.exe");

The problem I am having is creating the Internet Explorer with
Process.Start() and being able to control it using the shdocvw/mshtml
libraries.

Is there a way I can use the process id of the started "iexplore.exe" and
turn it into the IWebBrowser2 interface?

Many thanks in advance

Adam
Nov 16 '05 #1
5 7828
Hi,

First, sorry for a rather vague answer. From what I remember, there is a
custom window message allowing to obtain the Web browser interface when
being sent to an IE window. So your task will be to determine one of the
top-level windows of an "iexplore.exe" instance in question, and then to
send the custom message to that window, obtaining a 32-bit pointer to the
interface and then marshalling it to the managed space. So I welcome experts
on interop and IE to add necessary details!

--
Sincerely,
Dmitriy Lapshin [C# / .NET MVP]
Bring the power of unit testing to the VS .NET IDE today!
http://www.x-unity.net/teststudio.aspx

"Adam Stirk" <.> wrote in message
news:41***********************@ptn-nntp-reader01.plus.net...
Hi,

I have a application that I need to create multiple new "iexplore.exe"
processes (show more than once in taskmanger) and control them using the
shdocvw/mshtml.

I am able control Internet Explorer with instances created with the shdocvw. e.g.
Activator.CreateInstance(Type.GetTypeFromProgID
("InternetExplorer.Application");

And I am able to create the new "iexplore.exe" processes. e.g.
System.Diagnostics.Process.Start("iexplore.exe");

The problem I am having is creating the Internet Explorer with
Process.Start() and being able to control it using the shdocvw/mshtml
libraries.

Is there a way I can use the process id of the started "iexplore.exe" and
turn it into the IWebBrowser2 interface?

Many thanks in advance

Adam


Nov 16 '05 #2
I am also open to suggestion on how I could create a new "iexplore.exe"
process by using the shdocvw library, if this is at all possible.

Regards

Adam
"Adam Stirk" <.> wrote in message
news:41***********************@ptn-nntp-reader01.plus.net...
Hi,

I have a application that I need to create multiple new "iexplore.exe"
processes (show more than once in taskmanger) and control them using the
shdocvw/mshtml.

I am able control Internet Explorer with instances created with the shdocvw. e.g.
Activator.CreateInstance(Type.GetTypeFromProgID
("InternetExplorer.Application");

And I am able to create the new "iexplore.exe" processes. e.g.
System.Diagnostics.Process.Start("iexplore.exe");

The problem I am having is creating the Internet Explorer with
Process.Start() and being able to control it using the shdocvw/mshtml
libraries.

Is there a way I can use the process id of the started "iexplore.exe" and
turn it into the IWebBrowser2 interface?

Many thanks in advance

Adam

Nov 16 '05 #3
The reason I need to create separate processes is due to session cookies, is
there a way to clear these on each navigate?

"Adam Stirk" <.> wrote in message
news:41***********************@ptn-nntp-reader01.plus.net...
Hi,

I have a application that I need to create multiple new "iexplore.exe"
processes (show more than once in taskmanger) and control them using the
shdocvw/mshtml.

I am able control Internet Explorer with instances created with the shdocvw. e.g.
Activator.CreateInstance(Type.GetTypeFromProgID
("InternetExplorer.Application");

And I am able to create the new "iexplore.exe" processes. e.g.
System.Diagnostics.Process.Start("iexplore.exe");

The problem I am having is creating the Internet Explorer with
Process.Start() and being able to control it using the shdocvw/mshtml
libraries.

Is there a way I can use the process id of the started "iexplore.exe" and
turn it into the IWebBrowser2 interface?

Many thanks in advance

Adam

Nov 16 '05 #4
I have managed to find a solution to my problem. Here is my solution.

Process m_Proc = Process.Start("IExplore.exe");

InternetExplorer m_IEBrowser = null;
ShellWindows m_IEFoundBrowsers = new ShellWindowsClass();
foreach(InternetExplorer Browser in m_IEFoundBrowsers)
{
if(Browser.HWND == (int)m_Proc.MainWindowHandle)
{
m_IEBrowser = Browser;
break;
}
}

"Dmitriy Lapshin [C# / .NET MVP]" <x-****@no-spam-please.hotpop.com> wrote
in message news:%2****************@TK2MSFTNGP09.phx.gbl...
Hi,

First, sorry for a rather vague answer. From what I remember, there is a
custom window message allowing to obtain the Web browser interface when
being sent to an IE window. So your task will be to determine one of the
top-level windows of an "iexplore.exe" instance in question, and then to
send the custom message to that window, obtaining a 32-bit pointer to the
interface and then marshalling it to the managed space. So I welcome experts on interop and IE to add necessary details!

--
Sincerely,
Dmitriy Lapshin [C# / .NET MVP]
Bring the power of unit testing to the VS .NET IDE today!
http://www.x-unity.net/teststudio.aspx

"Adam Stirk" <.> wrote in message
news:41***********************@ptn-nntp-reader01.plus.net...
Hi,

I have a application that I need to create multiple new "iexplore.exe"
processes (show more than once in taskmanger) and control them using the
shdocvw/mshtml.

I am able control Internet Explorer with instances created with the

shdocvw.
e.g.
Activator.CreateInstance(Type.GetTypeFromProgID
("InternetExplorer.Application");

And I am able to create the new "iexplore.exe" processes. e.g.
System.Diagnostics.Process.Start("iexplore.exe");

The problem I am having is creating the Internet Explorer with
Process.Start() and being able to control it using the shdocvw/mshtml
libraries.

Is there a way I can use the process id of the started "iexplore.exe" and turn it into the IWebBrowser2 interface?

Many thanks in advance

Adam


Nov 16 '05 #5
I have managed to find a solution to my problem. Here is my solution.

Process m_Proc = Process.Start("IExplore.exe");

InternetExplorer m_IEBrowser = null;
ShellWindows m_IEFoundBrowsers = new ShellWindowsClass();
foreach(InternetExplorer Browser in m_IEFoundBrowsers)
{
if(Browser.HWND == (int)m_Proc.MainWindowHandle)
{
m_IEBrowser = Browser;
break;
}
}
"Dmitriy Lapshin [C# / .NET MVP]" <x-****@no-spam-please.hotpop.com> wrote
in message news:%2****************@TK2MSFTNGP09.phx.gbl...
Hi,

First, sorry for a rather vague answer. From what I remember, there is a
custom window message allowing to obtain the Web browser interface when
being sent to an IE window. So your task will be to determine one of the
top-level windows of an "iexplore.exe" instance in question, and then to
send the custom message to that window, obtaining a 32-bit pointer to the
interface and then marshalling it to the managed space. So I welcome experts on interop and IE to add necessary details!

--
Sincerely,
Dmitriy Lapshin [C# / .NET MVP]
Bring the power of unit testing to the VS .NET IDE today!
http://www.x-unity.net/teststudio.aspx

"Adam Stirk" <.> wrote in message
news:41***********************@ptn-nntp-reader01.plus.net...
Hi,

I have a application that I need to create multiple new "iexplore.exe"
processes (show more than once in taskmanger) and control them using the
shdocvw/mshtml.

I am able control Internet Explorer with instances created with the

shdocvw.
e.g.
Activator.CreateInstance(Type.GetTypeFromProgID
("InternetExplorer.Application");

And I am able to create the new "iexplore.exe" processes. e.g.
System.Diagnostics.Process.Start("iexplore.exe");

The problem I am having is creating the Internet Explorer with
Process.Start() and being able to control it using the shdocvw/mshtml
libraries.

Is there a way I can use the process id of the started "iexplore.exe" and turn it into the IWebBrowser2 interface?

Many thanks in advance

Adam

Nov 16 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
2897
by: mic | last post by:
I'm currently trying to write an MSIE automation software and have run into such problem - have no idea how to take control of external popup windows - I use WebBrowser COM object and am able to...
5
5401
by: Adam Stirk | last post by:
Hi, I have a application that I need to create multiple new "iexplore.exe" processes (show more than once in taskmanger) and control them using the shdocvw/mshtml. I am able control Internet...
0
1235
by: asadhussain | last post by:
I wrote a plugin to internet explorer that requires internet explorer to be shutdown and restarted. I figured out a way to shut down IE using the MSI and to start it back up using VBScript. I...
6
4575
by: tinkerman | last post by:
Hello net friends, I need to automate Internet Explorer in a very simple way. I need to: 1. press refresh (F5) on the currently loaded website. 2. press END button. 3. Click a button...
0
2633
by: john bailo | last post by:
I am attempting to create a c# program to iterate through the messages in an Outlook/Exchange public folder and extract the headers. My apologies to the VB/VBA groups, but you seem to have more...
2
2320
by: Neil | last post by:
I have an Access 2000 mdb file which opens MS Word docs using automation. Our WAN is somewhat slow, and it takes about six seconds to open Word and the specified document (20 KB) from within Access...
5
4568
by: puff | last post by:
I'm very new to Python and have a question concerning IE automation and detection of page completion. The MSDN article 180366 states in part: ---- The top-level frame fires the...
2
4019
by: pigeonrandle | last post by:
Hi, Does anyone know how get text from/ set text to 'child windows' of an Internet Explorer Server class window? Using WM_SETTEXT would be great, but i don't know how to get the handle of a child...
1
3990
by: Frederik Vanderhaegen | last post by:
Hi, I'm writing an application which handles Internet Explorer Automation. Through the application I'm able to automate logon on a certain webpage. When I automate the click on the logon button,...
0
7242
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7138
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7353
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7418
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
5662
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4737
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3222
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3212
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
781
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.