天道酬勤,学无止境

spy++

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 control object where "MainWindowhandle"is just a native main window handle of that hooked process, which you always take from .NET "Process" class after launching that process. But STRANGLY it happens that in some other hooked process which is the same C# .NET application, it returns valid object of Main "WinForm". So why it will not work in above case

2021-06-15 07:35:00    分类:问答    c#   .net   winforms   dll-injection   spy++

How does Spy++ construct its process list?

TL;DR - How does the Spy++ tool really construct its process list? Stage We have an MFC desktop application (running on Windows XP) that is hanging in that it doesn't react to any user input anymore. It is redrawn when switching to it via alt-tab however. (It does receive WM_SETFOCUS, WM_ACTIVATE, etc. It apparently does not receive any mouse or keyboard messages.) Since the app is hanging in some limbo, we pulled a few process dumps, but these were of little help so far. Enter: Spy++ We used Spy++ to find the information I gave above about the window messages this application seems to be

2021-06-11 09:03:54    分类:问答    windows   winapi   mfc   spy++   window-messages

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 it. I'm an experienced c# programmer, but have never worked with the Win32/user32 api which is what I'm assuming I'll have to deal with to pull this off. Any help that gets me going in the right direction is greatly appreciated. Update: I managed to use Spy++ to get the window handle, so I'm sure I can get the values some how.

2021-06-05 05:36:25    分类:问答    c#   windows   winapi   spy++

WinApi - How to obtain SHELLDLL_DefView

I am trying to obtain handle to SHELLDLL_DefView. So, I have this code. HWND hProgman = FindWindow(L"Progman", NULL); HWND hWnd = FindWindowEx(hProgman, 0, L"SHELLDLL_DefView", NULL); Eveyrtihing works OK, until I change in Windows desktop brackground to slideshow. Then when I search with spy++ hierarchy of the windows, than SHELLDLL_DefView has another parent. Now it is #32769 (Desktop) -> WorkerW -> SHELLDLL_DefView. So I can't find it. Problem is that when I try HWND desktop = GetDesktopWindow(); HWND hWnd = FindWindowEx(desktop , 0, L"WorkerW", NULL); HWND hWnd = FindWindowEx(hWnd, 0, L

2021-05-11 18:45:56    分类:问答    c++   windows   winapi   spy++

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 individually as well as taking the current WindowLong, and removing/adding it to that one, like so: SetWindowLong(pMainWindow, GWL_EXSTYLE, GetWindowLong(pMainWindow) & WS_EX_APPWINDOW); And tried removing it like so: SetWindowLong(pMainWindow, GWL_EXSTYLE, GetWindowLong(pMainWindow) & ~WS_EX_APPWINDOW); Also tried both those methods without first

2021-05-01 07:07:07    分类:问答    c#   pinvoke   spy++

如何在C#应用程序中获得类似于Spy ++的功能?(How can I get functionality similar to Spy++ in my C# app?)

问题 我对开发开源密码管理器Keepass的插件感兴趣。 目前,Keepass当前根据窗口标题检测要为您复制/粘贴的密码。 这样可以防止Keepass检测未针对当前网站(例如Chrome)主动更新其窗口标题的应用所需的当前密码。 我如何浏览另一个类似于Spy ++工作原理的进程窗口元素(按钮,标签,文本框)? 当您运行Spy ++时,可以将鼠标悬停在其他程序窗口上,并获得有关各种控件(标签,文本框等)的各种属性的各种信息。 理想情况下,我希望我的Keepass插件通过遍历活动窗口的元素来增强当前的窗口检测能力,以寻找匹配的帐户来复制/粘贴密码。 如何遍历其他进程的窗口元素,并能够使用C#检索标签和文本框值? 回答1 我正在这里回答类似的问题:如何检测线程是否具有Windows句柄? 像它所说的那样,主要思想是使用EnumWindows和EnumChildWindows API调用枚举过程窗口及其子窗口,以获取窗口句柄,然后使用WM_GETTEXT调用GetWindowText或SendDlgItemMessage以获得窗口文本。 我已经修改了代码以创建一个示例,该示例应该可以满足您的需求(抱歉,它有点长:)。 它遍历进程及其窗口,并将窗口文本转储到控制台中。 static void Main(string[] args) { foreach (Process procesInfo

2021-04-29 01:06:19    分类:技术分享    c#   winapi   spy++

是否有用于WPF的类似Spy ++的实用程序?(Is there a Spy++ like utility for WPF?)

问题 作为Win32背景下的“核心” WinForms程序员,我一直使用Spy ++来了解我的应用程序在UI级别上所做的事情,包括: 查看控件之间相互发送的事件。 在运行时查看控制树查找正在绘制显示部分的控件 然后,我经常在源代码中搜索控件名称,当您不得不在不太熟悉的大型应用程序上更改UI时,这将非常有用。 那么,如何对WPF应用程序执行相同的操作? (如果需要,您可以假设我可以访问WPF应用程序的源代码,但是我宁愿使用该实用程序,也不需要应用程序源代码。) 感谢您提供答案,我刚刚在StackOverflow中搜索了“探听”,并找到了一些有关WPF工具列表的问题/答案。 您使用什么工具进行WPF开发开发WPF或Silverlight应用程序的工具如何加快WPF程序? -有相关工具列表 回答1 是的,您可以使用Snoop。 就像WPF的Spy ++一样。 回答2 注意:当前帖子基于Web存档,截至2018/07/12,当前尚无原始页面! 我更喜欢Snoop,但也想指出Mole,它是WPF元素的Visual Studio调试器可视化工具:

2021-04-26 20:29:47    分类:技术分享    wpf   utilities   spy++

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 mimics Spy++ behavior and works on Managed applications (rather, shows Managed events/properties) and works on newer .NET Frameworks, up to 4.0?

2021-04-24 10:46:38    分类:问答    .net   managed   spy++

Why can't Spy++ see messages sent to UWP apps?

While we all got tangled up in this topic, it came to light that, while UWP apps do have top level windows and you can send (sensible) messages to them (*), and these do get through and have the expected effect, Spy++ doesn't ever seem to see those messages, or indeed any others that Windows itself might send. Can anyone shed any light on this? Just to provide a bit of background, Spy has no problem locating and inspecting these windows (the 'Finder Tool' works just fine) but message logging is totally mute. I have tested the Settings App, the On Screen Keyboard, Calendar and Calculator, and I

2021-04-21 18:44:56    分类:问答    windows   uwp   hwnd   spy++

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 time Finding the control that is drawing part of the display I then often search for the control name in the source code, very useful when you have to change the UI on a large application you don’t know well. So how do I do the same with a WPF application? (You may assume I have access to the source code of the WPF application if needed, however I

2021-04-08 13:18:10    分类:问答    wpf   utilities   spy++