Quantcast
Channel: Sysinternals Forums
Viewing all articles
Browse latest Browse all 10386

Process Explorer : Understanding Internet explorer instances

$
0
0
Author: GuyHoozdis
Subject: Understanding Internet explorer instances
Posted: 04 July 2013 at 9:05am

AaronMar is correct, but I doubt he is really guessing.  The code snippets you show indicate that your project is using COM/DCOM.  If you are not familiar with these concepts you should read-up on the WebBrowser Control.  I would skip reading too deep into DDE until you are familiar with the fundamentals.  Unless you are suspending threads in or changing the process priority on processes you don't own, then knowing or not-knowing about DDE is unlikely to affect the outcome of your project.

From your second post it sounds like you are looking at an example project (not code that you wrote) in Visual Studio- researching for you own project that you are about to create I presume.  Cool!  May I point out a thing or two that will be helpful to your understanding, I think.


First, the string "InternetExplorer.Application" that is being used in your code is called a version independent ProgID.  You will find that you can instantiate several other Windows applications, in particular all of the Office suite applications, using a very similar pattern. 

For example,
  • Excel.Application
  • Outlook.Application
  • Word.Application
  • ...
Each object will expose it's own methods (providing functionality that are specific to that application), but the basics of creating the objects are the same.



Second, if you look in the Registry on your system under the HKEY_CLASSES_ROOT hive you will find the aforementioned ProgIDs and more!

For example,
  • HKEY_CLASSES_ROOT\Excel.Application
  • HKEY_CLASSES_ROOT\InternetExplorer.Application
  • HKEY_CLASSES_ROOT\Office.Application
  • ...
You will notice, at least, two sub-keys under these ProgIDs; namely, CLSID and CurVer.  You will find that the default value under the CLSID key is a "GUID" (a.k.a. a "UUID") and you can also find that in the Registry listed under the HKEY_CLASSES_ROOT\CLSID\ key.  I let you google more of this subject on your own- it's a biggie.



Third, in the example project you are looking at, where you pulled the code snippets from, you should see a line that says

ie.Visible = True


When you are creating your objects, but aren't "seeing them"... just remember this.  The object will not be visible until you explicitly make it so.



Finally, to answer your question about other ways to run VB code.  Most, if not all, of the Office applications should provide an editor where you can write and execute VB code.

  1. Open a new workbook in Excel
  2. Select the "Developer" tab
  3. Select the "Visual Basic" option

Note: If you don't see the "Developer" tab then you will need to take some steps to enable it- refer to Google... or Bing (sorry, Bill)... whatever your preference.

The image you see here shows code from some of the provided Add-Ins.  You won't have them unless you enable them manually, but you should have the "VBAProject (book1)", where you can write your own VB modules.


Best of luck!


Viewing all articles
Browse latest Browse all 10386

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>