Become a member!

WinInspector: When Nostalgia Meets Innovation

A few weeks ago, during a consulting session where I was debugging a complex VCL application, I found myself needing to analyze the hierarchy of some Windows windows. It was then that I remembered a small tool I had written over 20 years ago: TDWinInfo. A simple program that allowed you to inspect Windows windows and get information about the underlying processes.

The Origins: TDWinInfo and the Early 2000s

It was the early 2000s, Windows XP dominated the desktop landscape, and we Delphi developers made do with the tools we had. TDWinInfo was born from a practical necessity: understanding what was happening “under the hood” when applications behaved strangely.

At the time, it was an essential tool, though limited by the technological constraints of that era. It worked and served its purpose well, but looking at it today, it seems almost prehistoric. The first version of TDWinInfo is still available on torry.net. I published it in 2001!

TDWinInfo: A Small Great Success

What I didn’t imagine when I wrote TDWinInfo is that over time it would become a reference tool in the developer community. Over the years, TDWinInfo has been mentioned on numerous websites and technical guides as a tool for identifying whether software was developed with Delphi or C++Builder. The principle was simple but effective: by showing the class names of Windows controls under the mouse cursor, it allowed recognizing Delphi applications by their characteristic nomenclatures, such as class names starting with “T” (TButton, TListView, etc.).

This “detective” use of TDWinInfo always made me smile. Who would have thought that a small tool born for debugging would become an instrument to “unmask” the technologies used by applications? It was our small contribution to the amateur reverse engineering of the time!

WinInspector: The Rebirth of an Idea

So I decided to completely rewrite that old tool, maintaining the original spirit but bringing it into the modern era. WinInspector was born: same DNA, but with functionality that 20 years ago we could only dream of.

What WinInspector Does

The basic concept remained identical: move your mouse over any window and get detailed information in real-time. But the similarities end there.

Window Information:

  • Handle (in hexadecimal and decimal format)
  • Windows class name
  • Window title
  • Precise position and dimensions
  • Visibility status
  • Window styles (VISIBLE, TOPMOST, LAYERED, etc.)
  • Verification if the window responds to messages

Process Information:

  • Process ID and Thread ID
  • Executable name with full path
  • Safe handling of access even for protected processes

Window Hierarchy:

  • Current window under cursor
  • Parent window (if it exists)
  • Root window of the hierarchy

Multi-Monitor Support:

  • Resolution of each monitor
  • Work area (excluding taskbar)
  • Virtual desktop for multi-screen configurations
  • Precise mouse position in the global coordinate system

Here’s WinInspector inspecting the Delphi IDE

As shown in the screenshot, just by hovering the mouse cursor over the Delphi code editor window, we can see, among other information, that:

  • The main Delphi code editor window class name is TEditControl
  • The edit control is a child of a TPanel
  • The main window class is named (as we all know) TAppBuilder
  • The window executable is bds.exe and its PID is 23348 while its main thread ID is 27096
  • …and my current setup is composed of 3 monitors

Technical Details That Make the Difference

WinInspector is built entirely in Delphi using VCL, with direct access to Windows APIs to obtain low-level information. Some interesting technical aspects:

  • Real-time updates every 500ms without performance impact
  • Robust error handling to avoid crashes with windows that close quickly
  • Dynamic memory allocation for handling variable-length window titles
  • Handle validity checks to prevent access violations
  • BeginUpdate/EndUpdate to eliminate flickering during updates

A Tool for Developers, by a Developer

Like TDWinInfo, WinInspector also stems from the daily needs of those who develop Windows software. It’s particularly useful for:

  • UI debugging - understanding exactly which control is under the mouse
  • Third-party application analysis - discovering how they’re built (yes, you can still “unmask” Delphi apps!)
  • Windows troubleshooting - identifying processes that aren’t responding
  • Multi-monitor configuration testing - verifying window behavior

From Past to Future

It’s fascinating to see how an idea born 20 years ago is still valid and useful today. TDWinInfo had a minimalist but effective approach; WinInspector maintains that simplicity while adding the power and reliability we can afford today.

And who knows, maybe in another 20 years someone will rewrite WinInspector for future technologies. The important thing is that the essence remains: a simple, direct tool that solves real problems without frills.

A Small Tribute to the Past

In the application title, I wanted to include the phrase “The TDWinInfo Legacy Continues”. It’s my small tribute to that little program that accompanied me for years, to those who used it to “investigate” applications, and to all those developers who, like me, maintain a special affection for their first tools.

Availability and Future

WinInspector is available on GitHub as an open source project. The code is clean, well-commented, and can be an excellent example for those who want to learn how to interface with Windows APIs using Delphi.

I have some additional features in mind for the future: DPI awareness support, information export, maybe a configurable “always on top” mode. But for now, it’s already a solid and reliable tool.

Conclusion

Writing WinInspector was a journey into memory, but also a demonstration of how good ideas never age. Tools change, technology improves, but the need to understand what’s happening in our system always remains current.

If you’re a Windows developer, give it a look. And if you happen to remember TDWinInfo and your “investigations” to discover who had used Delphi… well, consider this its worthy successor, with a few extra features for today’s digital detectives!


WinInspector is available on GitHub: github.com/danieleteti/wininspector

Comments

comments powered by Disqus