Re: Open new Internet Explorer window in a new process



I guess I should add that the issue I need to solve is when there is
already an IE process running. If one is not running, CoCreateInstance
creates a new one. However, if one is running, it just creates the new
IE window in the same process, which is what I don't want to happen.

On Nov 9, 9:41 am, "Nathan Jakubiak" <jakub...@xxxxxxxxxxxx> wrote:
Hi Peter,

When you say that you get a "new instance", do you mean a new process
is created? If so, that's what I'm looking for! I figured out how to
implement things using CreateProcess, however doing it that way I am
unable to connect to the DWebBrowserEvents2 event sink interface, which
I need to do.

On Nov 9, 5:26 am, peter.isb...@xxxxxxxxx wrote:

Jean-Fabrice RABAUTE skrev:

Nathan Jakubiak a écrit :
I am using CoCreateInstance(CLSID_InternetExplorer, 0, CLSCTX_SERVER,
IID_IWebBrowser2, (LPVOID*)&newIE) to
open up a new browser window and get a handle to its IWebBrowser2
interface. However, if there is an Internet Explorer instance already
running, it opens it in the same process as that running instance. If
I want to force it to open in a new process, and still get a handle to
the IWebBrowser2 interface, how do I do that?

Hi,

You can use "CreateProcess" and launch iexplore.exe process with the url
as argument.
Be sure to check all the arguments as well as the process launched, it
may be a security hole if the process is badly launched.

--
Regards / Cordialement

====================
Jean-Fabrice Rabaute
CORE SERVICES :: Software/Web development & Consulting services

http://www.debugbar.com:The most advanced WEB development tool for
Internet Explorer
http://www.core-services.fr-{Enjoy the future today}Hi Jean-Fabrice,

Actually I find it odd that a new instance of IE is not created for
Nathan.

When I test

hr = ::CoCreateInstance (CLSID_InternetExplorer, NULL, CLSCTX_SERVER,
IID_IWebBrowser2, (void**)ppWebBrowser2);

on my computer, it nicely opens a new instance of IE.

Do you really use CreateProcess for opening a new instance of IE?

Could this problem Nathan is having be due to a setting in IE or fixed
in a SP or OS depedent (I've tested on XP SP2 and Win2K SP4).

/Peter

.



Relevant Pages

  • Re: Open new Internet Explorer window in a new process
    ... unable to connect to the DWebBrowserEvents2 event sink interface, ... it opens it in the same process as that running instance. ... Jean-Fabrice Rabaute ... Could this problem Nathan is having be due to a setting in IE or fixed ...
    (microsoft.public.inetsdk.programming.webbrowser_ctl)
  • Re: Open new Internet Explorer window in a new process
    ... if there is an Internet Explorer instance already ... it opens it in the same process as that running instance. ... the IWebBrowser2 interface, ...
    (microsoft.public.inetsdk.programming.webbrowser_ctl)
  • Re: Open new Internet Explorer window in a new process
    ... open up a new browser window and get a handle to its IWebBrowser2 ... if there is an Internet Explorer instance already ... it opens it in the same process as that running instance. ... the IWebBrowser2 interface, ...
    (microsoft.public.inetsdk.programming.webbrowser_ctl)
  • Re: Internet Explorer 6 Problems
    ... %windir%\Network Diagnostic\xpnetdiag.exe (file missing) ... Windows Defender and/or Spybot Search & ... How to manage Internet Explorer add-ons in Windows XP Service Pack 2 ... The Internet Explorer that opens up is also very buggy and ...
    (microsoft.public.windows.inetexplorer.ie6.browser)
  • Re: Sending Keys from Excel to Internet Explorer
    ... I'm thinking that you can do something similar with Internet Explorer. ... Dim MySessions As Object ... 'CREATE A SESSIONS OBJECT: ... I have an example of some code that opens an application, ...
    (microsoft.public.excel.programming)