Questions tagged [spy++]

The main purpose of Spy++ is to log messages that are being passed around in Windows.

Parts adapted from Pat Brenner's Spy++ Internals posting on the Visual C++ Team Blog, and the MSDN documentation on Spy++.

Spy++ (aka SpyXX, as the main binary is SpyXX.EXE) shows you a parented hierarchy of all Windows in your system.
For each Window, you can see the Windows messages handled by it, and the Windows properties associated with it.

Spy++ ships with the retail (not express!) versions of Visual Studio.
It is a native Win32 utility that also runs on x64 of Windows.

Spy++ usually is installed in %ProgramFiles%Microsoft Visual Studio ##.#\Common#\Tools\ (where the # depend on your Visual Studio version). On x64 systems it will be using %ProgramFiles(x86)% as base.

Spy++ is based on these files:

  • spyxx.exe - Microsoft Spy++ Toolbar
  • spyxxhk.dll - Microsoft Spy++ Hook
  • spyxxui.dll - Microsoft Spy++ Resources
  • spyxx.chm - help file for spyxx.exe

Note that on various systems, the binary DLL version numbers and textual version numbers do not always match (in Visual Studio 2010, the binary versions indicate 10, but the text versions in the DLL indicate 9).

Pat Brenner wrote large portions of Spy++. Though he is not the original author, he owned it from 1993 to 2003, and owns it since 2007.

From Pat's blog post:

Spy++ is made to be an observer (and not a modifier) of the system around it. [...] the main purpose of Spy++ is to log messages that are being passed around in Windows. Spy++ accomplishes this by the use of three global message hooks: a WH_GETMESSAGE hook, which hooks a message posted to a window (via PostMessage); a WH_CALLWNDPROC hook, which hooks a message sent to a window (via SendMessage); and a WH_CALLWNDPROCRET hook, which hooks the return of a message sent to a window (via SendMessage).

--jeroen

136 questions
62
votes
2 answers

How do I get Spy++ with Visual Studio 2017?

Background I am looking for Spy++. I believe it should be included in Visual Studio 2017 since the latest Visual Studio help content references it: https://docs.microsoft.com/en-us/visualstudio/debugger/introducing-spy-increment. Problem I have just…
Sam
  • 35,545
  • 30
  • 157
  • 202
59
votes
10 answers

I want Spy++ but I don't have Visual Studio

I only have SQL Server 2008 Client tools. I would like to use Spy++, but of course, it only comes with the Visual Studio installation. Is there a good replacement for Spy++ that I can use?
Raj More
  • 44,313
  • 31
  • 123
  • 191
30
votes
2 answers

Is there a Spy++ like utility for WPF?

As a “hardcore” WinForms programmer from a Win32 background I have always used Spy++ to understand what my applications are doing at the UI level including: Seeing what events the controls are sending to each other. Seeing the control tree at run…
Ian Ringrose
  • 49,271
  • 50
  • 203
  • 302
12
votes
3 answers

C# Hiding an application from the taskbar

I have been struggling to hide another application from the taskbar from my application. I have been using the SetWindowLong function in order to set/remove WS_EX_APPWINDOW on the extended style. I have tried both setting and removing the property…
René Sackers
  • 1,983
  • 1
  • 22
  • 39
10
votes
1 answer

Why are some items greyed out in Spy++'s Windows view?

To modify a window of another program, I need to find a specific SysTreeView32 in it using EnumChildWindows API call. When I inspect the window using Spy++, there are a number of SysTreeView32's in it but all are greyed out except one, which is the…
Hossein
  • 3,839
  • 2
  • 20
  • 43
10
votes
5 answers

How can I get functionality similar to Spy++ in my C# app?

I'm interested in working on a plugin for Keepass, the open-source password manager. Right now, Keepass currently detects what password to copy/paste for you based off of the window title. This prevents Keepass from detecting the current password…
anon
9
votes
5 answers

How can you read values from an open application in Windows?

I want to create a program or use a program that will read the memory values out of another application. Does anyone know of an application/library that will do this? The target app is this. I would like to read the exchange rate values from…
Arron S
  • 5,395
  • 6
  • 47
  • 57
7
votes
1 answer

C# get child handles using FindWindowEx by name and ordinal number

According to http://msdn.microsoft.com/en-us/library/ms633500(v=vs.85).aspx I define FindWindowEx function. using System.Runtime.InteropServices; [DllImport("user32.dll", CharSet=CharSet.Unicode)] static extern IntPtr FindWindowEx(IntPtr…
84RR1573R
  • 3,012
  • 2
  • 23
  • 42
7
votes
5 answers

How does spy++ find out what is the window at a certain point on the screen?

I am curious how spy++ Finder Tool finds out the window handle for the window over which the mouse is. Is there any WIN32 function for getting the handle of the topmost window that occupies a certain pixel on the display?
Razvi
  • 2,578
  • 5
  • 27
  • 38
6
votes
5 answers

Why Control.FromHandle(IntPtr) returns null in one hooked process and returns valid object of "Form"? in another hooked process?

I am facing a problem related to get out all the controls from some hooked process. My SpyDll launched into hooked process sucessfully, But when I check the statement Control control = Control.FromHandle(MainWindowHandle), it returns null into…
Usman
  • 2,426
  • 4
  • 36
  • 68
6
votes
3 answers

Managed version of Spy++ Tool?

Awhile ago, I needed a Spy++ like application for some .NET UI debugging. I found an old MSDN article with a sample that does things similarly, But that stopped working in newer .NET Framework versions. Does anyone know of/wrote an application that…
Ran Sagy
  • 560
  • 6
  • 17
6
votes
2 answers

Spy++ for PowerBuilder applications

I'm trying to write a tool which lets me inspect the state of a PowerBuilder-based application. What I'm thinking of is something like Spy++ (or, even nicer, 'Snoop' as it exists for .NET applications) which lets me inspect the object tree (and…
Frerich Raabe
  • 81,733
  • 18
  • 105
  • 196
5
votes
4 answers

What happened to ManagedSpy?

ManagedSpy is supposed to be the .NET equivalent of Spy++, but somehow the download page is now not availeble any more. Anyone who knows why? Anyone that knows a replacement? --jeroen
Jeroen Wiert Pluimers
  • 23,000
  • 6
  • 63
  • 142
5
votes
1 answer

How to get hidden windows handle of the windows that show hidden system tray icons

I am trying to write application in C# that catch the handle of the hidden windows that appear when pressing the button ("Show hidden icons"). When we don't show all the notification area we have hidden system tray icons. When we press on the…
E235
  • 6,640
  • 11
  • 56
  • 99
5
votes
3 answers

Spy++ and windows closed when they lose focus

I would like to know if there is a way with Spy++ to get the properties of a window that is automatically closed when it loses the focus (which is what happens when I switch to Spy++). Thanks!
Yannick
  • 61
  • 1
1
2 3
9 10