Results 1 to 4 of 4

Thread: Programmatically Terminate IE

  1. #1
    VirtuallyVB
    Guest

    Question Programmatically Terminate IE

    1)Actually the real question is, "How do I programmatically delete all history of a web surfing session?" (i.e. cookies, temp files, urls, anything I missed in this list) under IE and/or Netscape, maybe even Opera.

    2)If you don't know #1, perhaps you can start with, "How do I programmatically terminate IE?" I'd like to have a small executable, so I'm thinking of C++. Maybe one of you C/C++ Gurus can translate this into C++:
    http://209.207.250.138/articles/objects/index3.html
    Starts at http://209.207.250.138/articles/objects/
    But IE would already be running and was not invoked by my application.
    Or is the solution to FindWindowEx with text "Microsoft Internet Explorer" and terminate that? I would still need code.

    3)What would I have to delete to remove all history of a web session? I can only think of cookies, temp files, and urls in the dropdown window; oh and autocompleted urls--unless that is covered under urls.

    Thanks.

  2. #2
    Megatron
    Guest
    To terminate IE.
    Code:
    HWND hWnd;
    
    hWnd = FindWindowEx(NULL, NULL, "IEFrame", NULL);
    PostMessage ( hWnd, WM_CLOSE, 0, 0 );
    PostMessage ( hWnd, WM_DESTROY, 0, 0);
    PostMessage ( hWnd, WM_QUIT, 0, 0);

  3. #3
    VirtuallyVB
    Guest
    Thanks. That code looks familiar.

    Any comment for question #3 (the sort of repeat of #1)?

  4. #4
    VirtuallyVB
    Guest

    Question

    On NT v4, I see Spy++ says a new launch of IE, "Internet Explorer" is an IEFrame but the new browser windows created by Ctrl+N are CabinetWClass. I can't seem to launch a true "My Computer", only a true "Explorer" which is ExploreWClass.

    On Win98, I see Spy++ says a new launch of IE, "Internet Explorer" is also IEFrame and the new browser windows created by Ctrl+N are also CabinetWClass. But a true "My Computer", is also CabinetWClass, but I didn't test a true "Explorer" on Win98 to find out its class.

    With the default scheme:
    On NT:
    A true? "My Computer" which is a file viewer has the yellow folder/magnifying glass icon.
    A true "Explorer" which is a file viewer has the yellow folder/magnifying glass icon.
    A launched IE "Internet Explorer" and ctrl+n new browser window "Web Browsers" have the blue e/document icon.

    On Win98:
    A true? "My Computer" which is a file viewer has the pc icon.
    A true "Explorer" which is a file viewer has the yellow folder/magnifying glass icon.
    A launched IE "Internet Explorer" and ctrl+n new browser window "Web Browsers" have the blue e/document icon.

    What classes should I use for both platforms to get only the web browser (whether it is a new launch or a ctrl+n window)? How can I test that I actually have a file browser instead of a web browser on Win98? Can I get a list/array of all handles before filtering out the non browser ones? If I don't, I think my app will always return a file browser once found (if I don't kill/destroy it).

    The only solution I have is to test if the title contains "My Computer" but if a ctrl+n web browser contains that text (low probability, but possible), this technique wouldn't work (unless I test for "begins with" that text maybe)?

    Again, what other traces need to be removed to delete all history of a web session?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width