Processes, Modules, Top Windows, Instances, and Threads

The Top Windows, Processes, and Modules list boxes of WinWatch show three different views of what’s going on inside Windows. There is no Instances list box, but instances played a big part in the way the 16-bit version of WinWatch created and synchronized the other list boxes. From their starring role in the 16-bit world, instances have been reduced to bit parts in 32-bit Windows. The up and coming stars of the 32-bit world are threads—although they haven’t yet achieved much notoriety in Visual Basic and don’t even merit their own list box in WinWatch.

To understand how all these parts work together, let’s start with some definitions:

The three list boxes help show how the different parts work together. Notice that when you select a different top window or process, the module list is regenerated. This is different from the 16-bit version of WinWatch, which displayed one global list of modules. In 32-bit Windows, each process has its own separate module list. You can’t get a global module list (except by merging all the process module lists and eliminating duplicates).

A process usually has one top window, but it can have multiple top windows, no top windows, or invisible top windows. In Visual Basic terms, having one top window means having a startup form; having multiple top windows means starting more than one modal form from Sub Main; having no top windows means doing all processing from Sub Main; having invisible top windows means setting Visible to False on all top-level forms.